Don't crash if for some reason your CONs don't define actors like SHOTSPARK1, which has its strength value used in hardcoded behavior.

git-svn-id: https://svn.eduke32.com/eduke32@4318 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2014-02-10 10:56:27 +00:00
parent 5d92bef194
commit 8146f6014c

View file

@ -164,9 +164,9 @@ static inline int32_t G_HaveActor(int32_t actortile)
static inline int32_t G_InitialActorStrength(int32_t actortile)
{
#ifdef LUNATIC
return g_elActors[actortile].strength;
return G_HaveActor(actortile) ? g_elActors[actortile].strength : 0;
#else
return g_tile[actortile].execPtr[0];
return G_HaveActor(actortile) ? g_tile[actortile].execPtr[0] : 0;
#endif
}