mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-24 23:14:01 +00:00
Remove unused Lua func entity_watchEntity()
This commit is contained in:
parent
0cc2f565d7
commit
0edb2d609a
4 changed files with 1 additions and 41 deletions
|
@ -209,7 +209,6 @@ Entity::Entity()
|
|||
slowingToStopPathTimer = 0;
|
||||
slowingToStopPath = 0;
|
||||
followPos = 0;
|
||||
watchingEntity = 0;
|
||||
swimPath = false;
|
||||
currentEntityTarget = 0;
|
||||
deleteOnPathEnd = false;
|
||||
|
@ -534,11 +533,6 @@ bool Entity::hasTarget(int t)
|
|||
return (targets[t]!=0);
|
||||
}
|
||||
|
||||
void Entity::watchEntity(Entity *e)
|
||||
{
|
||||
watchingEntity = e;
|
||||
}
|
||||
|
||||
void Entity::destroy()
|
||||
{
|
||||
if (stopSoundsOnDeath)
|
||||
|
@ -1589,23 +1583,6 @@ void Entity::onUpdate(float dt)
|
|||
{
|
||||
movementDetails(v);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (watchingEntity)
|
||||
{
|
||||
Vector v = position - watchingEntity->position;
|
||||
if (v.x < 0)
|
||||
{
|
||||
if (!isfh())
|
||||
flipHorizontal();
|
||||
}
|
||||
else if (v.x > 0)
|
||||
{
|
||||
if (isfh())
|
||||
flipHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wasFollowing && !isFollowingPath())
|
||||
{
|
||||
|
|
|
@ -219,7 +219,6 @@ public:
|
|||
void doFriction(float dt, float len);
|
||||
|
||||
bool isNormalLayer() const;
|
||||
void watchEntity(Entity *e);
|
||||
void idle();
|
||||
int followPos;
|
||||
void slowToStopPath(float t);
|
||||
|
@ -393,7 +392,6 @@ protected:
|
|||
float slowingToStopPathTimer, slowingToStopPath;
|
||||
|
||||
void movementDetails(Vector v);
|
||||
Entity *watchingEntity;
|
||||
virtual void onPathEnd();
|
||||
InterpolatedVector multColor;
|
||||
EntityType entityType;
|
||||
|
|
|
@ -5917,20 +5917,6 @@ luaFunc(entity_getDistanceToPoint)
|
|||
luaReturnNum(dist);
|
||||
}
|
||||
|
||||
luaFunc(entity_watchEntity)
|
||||
{
|
||||
Entity *e = entity(L);
|
||||
Entity *e2 = 0;
|
||||
if (lua_touserdata(L, 2) != NULL)
|
||||
e2 = entity(L, 2);
|
||||
|
||||
if (e)
|
||||
{
|
||||
e->watchEntity(e2);
|
||||
}
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
luaFunc(setNaijaHeadTexture)
|
||||
{
|
||||
Avatar *a = dsq->game->avatar;
|
||||
|
@ -10757,8 +10743,6 @@ static const struct {
|
|||
luaRegister(setSceneColor2),
|
||||
luaRegister(getSceneColor2),
|
||||
|
||||
luaRegister(entity_watchEntity),
|
||||
|
||||
luaRegister(entity_isEntityInRange),
|
||||
luaRegister(entity_isPositionInRange),
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ local WARN_FUNCTIONS =
|
|||
setupConversationEntity = true,
|
||||
entity_grabTarget = true,
|
||||
entity_releaseTarget = true,
|
||||
entity_watchEntity = true,
|
||||
}
|
||||
|
||||
-- These returned something important, so here we just return a failure/dummy value
|
||||
|
|
Loading…
Add table
Reference in a new issue