diff options
| author | xolatile | 2025-07-17 23:28:55 +0200 |
|---|---|---|
| committer | xolatile | 2025-07-17 23:28:55 +0200 |
| commit | c79dda69d6e603500a5681430172b5152041af0a (patch) | |
| tree | c1669442318e77a9ae76009edd5eefcaa69064ce /src/shared/ents.h | |
| parent | 5b88d873f42b1cad5c5fd03888cfe45b82da06d6 (diff) | |
| download | xolatile-badassbug-c79dda69d6e603500a5681430172b5152041af0a.tar.xz xolatile-badassbug-c79dda69d6e603500a5681430172b5152041af0a.tar.zst | |
Big changed mentioned in IRC channel...
Diffstat (limited to 'src/shared/ents.h')
| -rw-r--r-- | src/shared/ents.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/shared/ents.h b/src/shared/ents.h index f4da8f5..91ccd8f 100644 --- a/src/shared/ents.h +++ b/src/shared/ents.h @@ -83,17 +83,17 @@ struct physent // base entity type, can be affe uchar physstate; // one of PHYS_* above uchar state, editstate; // one of CS_* above uchar type; // one of ENT_* above - uchar collidetype; // one of COLLIDE_* above + uchar collidetype; // one of COLLIDE_* above bool blocked; // used by physics to signal ai - physent() : o(0, 0, 0), deltapos(0, 0, 0), newpos(0, 0, 0), yaw(0), pitch(0), roll(0), maxspeed(100), + physent() : o(0, 0, 0), deltapos(0, 0, 0), newpos(0, 0, 0), yaw(0), pitch(0), roll(0), maxspeed(100), radius(4.1f), eyeheight(14), aboveeye(1), xradius(4.1f), yradius(4.1f), zmargin(0), state(CS_ALIVE), editstate(CS_ALIVE), type(ENT_PLAYER), collidetype(COLLIDE_ELLIPSE), blocked(false) { reset(); } - + void resetinterp() { newpos = o; @@ -114,7 +114,7 @@ struct physent // base entity type, can be affe vec feetpos(float offset = 0) const { return vec(o).add(vec(0, 0, offset - eyeheight)); } vec headpos(float offset = 0) const { return vec(o).add(vec(0, 0, offset)); } - bool maymove() const { return timeinair || physstate < PHYS_FLOOR || vel.squaredlen() > 1e-4f || deltapos.squaredlen() > 1e-4f; } + bool maymove() const { return timeinair || physstate < PHYS_FLOOR || vel.squaredlen() > 1e-4f || deltapos.squaredlen() > 1e-4f; } }; enum @@ -128,7 +128,7 @@ enum ANIM_EDIT, ANIM_LAG, ANIM_TAUNT, ANIM_WIN, ANIM_LOSE, ANIM_GUN_IDLE, ANIM_GUN_SHOOT, ANIM_VWEP_IDLE, ANIM_VWEP_SHOOT, ANIM_SHIELD, ANIM_POWERUP, - ANIM_MAPMODEL, ANIM_TRIGGER, + ANIM_MAPMODEL, NUMANIMS }; @@ -143,7 +143,7 @@ static const char * const animnames[] = "edit", "lag", "taunt", "win", "lose", "gun idle", "gun shoot", "vwep idle", "vwep shoot", "shield", "powerup", - "mapmodel", "trigger" + "mapmodel" }; #define ANIM_ALL 0x7F @@ -206,8 +206,8 @@ struct dynent : physent // animated characters, or chara uchar occluded; dynent() : ragdoll(NULL), query(NULL), lastrendered(0), occluded(0) - { - reset(); + { + reset(); } ~dynent() @@ -217,13 +217,13 @@ struct dynent : physent // animated characters, or chara if(ragdoll) cleanragdoll(this); #endif } - + void stopmoving() { k_left = k_right = k_up = k_down = jumping = false; move = strafe = 0; } - + void reset() { physent::reset(); |
