fix: crash with hl25 structs on xash3d again
fix: %t placeholder should return damage inflictor when used in team attack section of chat fix: all arguments in bot commands are lowercased (resolves #680) bot: disable threads when engine's timescale is active bot: a little refactor for the code all over the places linkage: resolved crash due to sse alignment on ancient engines (resolves #614) utils move wave parse into crlib practice: move loading practice to thread pool build: allow to build with static linkents instead of hooking dlsym Co-Authored-By: Max <161382234+dyspose@users.noreply.github.com>
This commit is contained in:
parent
24be4479de
commit
38c45aff9a
37 changed files with 348 additions and 304 deletions
10
inc/engine.h
10
inc/engine.h
|
|
@ -316,27 +316,27 @@ public:
|
|||
}
|
||||
|
||||
// gets edict pointer out of entity index
|
||||
edict_t *entityOfIndex (const int index) {
|
||||
CR_FORCE_INLINE edict_t *entityOfIndex (const int index) {
|
||||
return static_cast <edict_t *> (m_startEntity + index);
|
||||
};
|
||||
|
||||
// gets edict pointer out of entity index (player)
|
||||
edict_t *playerOfIndex (const int index) {
|
||||
CR_FORCE_INLINE edict_t *playerOfIndex (const int index) {
|
||||
return entityOfIndex (index) + 1;
|
||||
};
|
||||
|
||||
// gets edict index out of it's pointer
|
||||
int indexOfEntity (const edict_t *ent) {
|
||||
CR_FORCE_INLINE int indexOfEntity (const edict_t *ent) {
|
||||
return static_cast <int> (ent - m_startEntity);
|
||||
};
|
||||
|
||||
// gets edict index of it's pointer (player)
|
||||
int indexOfPlayer (const edict_t *ent) {
|
||||
CR_FORCE_INLINE int indexOfPlayer (const edict_t *ent) {
|
||||
return indexOfEntity (ent) - 1;
|
||||
}
|
||||
|
||||
// verify entity isn't null
|
||||
bool isNullEntity (const edict_t *ent) {
|
||||
CR_FORCE_INLINE bool isNullEntity (const edict_t *ent) {
|
||||
return !ent || !indexOfEntity (ent) || ent->free;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue