mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-15 03:02:23 +00:00
srb2::Mobj: add hitlag methods
This commit is contained in:
parent
5cd6bf81f7
commit
5cbb11cbfc
1 changed files with 14 additions and 0 deletions
14
src/mobj.hpp
14
src/mobj.hpp
|
|
@ -15,6 +15,8 @@
|
|||
#include "math/fixed.hpp"
|
||||
#include "math/vec.hpp"
|
||||
|
||||
#include "doomtype.h"
|
||||
#include "k_hitlag.h"
|
||||
#include "info.h"
|
||||
#include "p_local.h"
|
||||
#include "p_mobj.h"
|
||||
|
|
@ -197,6 +199,18 @@ struct Mobj : mobj_t
|
|||
voice(sfx, volume);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Hitlag
|
||||
//
|
||||
|
||||
INT32 hitlag() const { return mobj_t::hitlag; }
|
||||
void hitlag(INT32 tics, bool damage = false) { K_AddHitLag(this, tics, damage); }
|
||||
void hitlag(Mobj* inflictor, Mobj* source, INT32 tics, bool damage)
|
||||
{
|
||||
K_SetHitLagForObjects(this, inflictor, source, tics, damage);
|
||||
}
|
||||
};
|
||||
|
||||
}; // namespace srb2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue