mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
Merge pull request #361 from MajorCooke/A_SetSpecies
- Added A_SetSpecies(<species>,<pointer>).
This commit is contained in:
commit
c142488107
2 changed files with 20 additions and 0 deletions
|
@ -5764,6 +5764,25 @@ 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;
|
||||
}
|
||||
|
||||
mobj->Species = species;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
@ -331,6 +331,7 @@ ACTOR Actor native //: Thinker
|
|||
action native A_SetHealth(int health, int ptr = AAPTR_DEFAULT);
|
||||
action native A_ResetHealth(int ptr = AAPTR_DEFAULT);
|
||||
action native A_JumpIfHigherOrLower(state high, state low, float offsethigh = 0, float offsetlow = 0, bool includeHeight = true, int ptr = AAPTR_TARGET);
|
||||
action native A_SetSpecies(name species, int ptr = AAPTR_DEFAULT);
|
||||
action native A_SetRipperLevel(int level);
|
||||
action native A_SetRipMin(int min);
|
||||
action native A_SetRipMax(int max);
|
||||
|
|
Loading…
Reference in a new issue