mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-22 12:01:13 +00:00
Added PSpriteTick virtual
This commit is contained in:
parent
b0137e50ee
commit
c622c63127
2 changed files with 21 additions and 6 deletions
|
@ -509,6 +509,11 @@ class Actor : Thinker native
|
||||||
native clearscope void DisableLocalRendering(uint playerNum, bool disable);
|
native clearscope void DisableLocalRendering(uint playerNum, bool disable);
|
||||||
native ui bool ShouldRenderLocally(); // Only clients get to check this, never the playsim.
|
native ui bool ShouldRenderLocally(); // Only clients get to check this, never the playsim.
|
||||||
|
|
||||||
|
// Called when the Actor is being used within a PSprite. This happens before potentially changing PSprite
|
||||||
|
// state so that any custom actions based on things like player input can be done before moving to the next
|
||||||
|
// state of something like a weapon.
|
||||||
|
virtual void PSpriteTick(PSprite psp) {}
|
||||||
|
|
||||||
// Called by inventory items to see if this actor is capable of touching them.
|
// Called by inventory items to see if this actor is capable of touching them.
|
||||||
// If true, the item will attempt to be picked up. Useful for things like
|
// If true, the item will attempt to be picked up. Useful for things like
|
||||||
// allowing morphs to pick up limited items such as keys while preventing
|
// allowing morphs to pick up limited items such as keys while preventing
|
||||||
|
|
|
@ -2706,6 +2706,15 @@ class PSprite : Object native play
|
||||||
|
|
||||||
void Tick()
|
void Tick()
|
||||||
{
|
{
|
||||||
|
if (processPending)
|
||||||
|
{
|
||||||
|
if (Caller)
|
||||||
|
{
|
||||||
|
Caller.PSpriteTick(self);
|
||||||
|
if (bDestroyed)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (processPending)
|
if (processPending)
|
||||||
{
|
{
|
||||||
// drop tic count and possibly change state
|
// drop tic count and possibly change state
|
||||||
|
@ -2718,6 +2727,7 @@ class PSprite : Object native play
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ResetInterpolation()
|
void ResetInterpolation()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue