- Added A_SetSpecies(<species>,<pointer>).

This commit is contained in:
MajorCooke 2015-08-24 12:45:10 -05:00
commit f9e70a82c6
2 changed files with 23 additions and 0 deletions

View file

@ -5764,6 +5764,28 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfHigherOrLower)
ACTION_JUMP(low);
}
//===========================================================================
// A_SetSpecies(str species, ptr)
//
// Sets the species of the calling actor('s pointer).
//===========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpecies)
{
ACTION_PARAM_START(2);
ACTION_PARAM_NAME(species, 0);
ACTION_PARAM_INT(ptr, 1);
AActor *mobj = COPY_AAPTR(self, ptr);
if (!mobj)
{
ACTION_SET_RESULT(false);
return;
}
if (!stricmp(species, "None") || !stricmp(species, ""))
mobj->Species = NAME_None;
else
mobj->Species = species;
}
//===========================================================================
//