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 | |
| 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')
| -rw-r--r-- | src/shared/ents.h | 20 | ||||
| -rw-r--r-- | src/shared/iengine.h | 9 | ||||
| -rw-r--r-- | src/shared/igame.h | 7 |
3 files changed, 15 insertions, 21 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(); diff --git a/src/shared/iengine.h b/src/shared/iengine.h index 32b1957..80f876d 100644 --- a/src/shared/iengine.h +++ b/src/shared/iengine.h @@ -74,9 +74,9 @@ struct selinfo extern int worldsize; if(grid <= 0 || grid >= worldsize) return false; if(o.x >= worldsize || o.y >= worldsize || o.z >= worldsize) return false; - if(o.x < 0) { s.x -= (grid - 1 - o.x)/grid; o.x = 0; } - if(o.y < 0) { s.y -= (grid - 1 - o.y)/grid; o.y = 0; } - if(o.z < 0) { s.z -= (grid - 1 - o.z)/grid; o.z = 0; } + if(o.x < 0) { s.x -= (grid - 1 - o.x)/grid; o.x = 0; } + if(o.y < 0) { s.y -= (grid - 1 - o.y)/grid; o.y = 0; } + if(o.z < 0) { s.z -= (grid - 1 - o.z)/grid; o.z = 0; } s.x = clamp(s.x, 0, (worldsize - o.x)/grid); s.y = clamp(s.y, 0, (worldsize - o.y)/grid); s.z = clamp(s.z, 0, (worldsize - o.z)/grid); @@ -307,9 +307,6 @@ extern void damageblend(int n); extern void damagecompass(int n, const vec &loc); extern void cleardamagescreen(); -extern vec minimapcenter, minimapradius, minimapscale; -extern void bindminimap(); - extern matrix4 hudmatrix; extern void resethudmatrix(); extern void pushhudmatrix(); diff --git a/src/shared/igame.h b/src/shared/igame.h index 113ca17..6c8c486 100644 --- a/src/shared/igame.h +++ b/src/shared/igame.h @@ -8,7 +8,6 @@ namespace entities extern int extraentinfosize(); extern void writeent(entity &e, char *buf); extern void readent(entity &e, char *buf, int ver); - extern float dropheight(entity &e); extern void fixentity(extentity &e); extern void entradius(extentity &e, bool color); extern bool mayattach(extentity &e); @@ -19,7 +18,6 @@ namespace entities extern void clearents(); extern vector<extentity *> &getents(); extern const char *entmodel(const entity &e); - extern void animatemapmodel(const extentity &e, int &anim, int &basetime); } namespace game @@ -94,9 +92,8 @@ namespace game extern bool serverinfostartcolumn(g3d_gui *g, int i); extern void serverinfoendcolumn(g3d_gui *g, int i); extern bool serverinfoentry(g3d_gui *g, int i, const char *name, int port, const char *desc, const char *map, int ping, const vector<int> &attr, int np); - extern bool needminimap(); -} - +} + namespace server { extern void *newclientinfo(); |
