diff options
Diffstat (limited to 'src/game/server')
| -rw-r--r-- | src/game/server/game_server.cpp | 14 | ||||
| -rw-r--r-- | src/game/server/game_server.h | 38 |
2 files changed, 25 insertions, 27 deletions
diff --git a/src/game/server/game_server.cpp b/src/game/server/game_server.cpp index ddb3d9ab..f7bf976e 100644 --- a/src/game/server/game_server.cpp +++ b/src/game/server/game_server.cpp @@ -8,10 +8,8 @@ data_container *data = 0x0; -using namespace baselib; - // --------- DEBUG STUFF --------- -const int debug_bots = 0; +const int debug_bots = 3; // --------- PHYSICS TWEAK! -------- const float ground_control_speed = 7.0f; @@ -653,7 +651,7 @@ void projectile::snap(int snapping_client) ////////////////////////////////////////////////// // projectile_backpackrocket ////////////////////////////////////////////////// -projectile_backpackrocket::projectile_backpackrocket(baselib::vec2 pos, baselib::vec2 target, int owner, entity* powner) +projectile_backpackrocket::projectile_backpackrocket(vec2 pos, vec2 target, int owner, entity* powner) : projectile(WEAPON_PROJECTILETYPE_ROCKET, owner, pos, vec2(0,0), 100, powner, 0, 0, 0, -1, WEAPON_ROCKET_BACKPACK) { stage = 0; @@ -1157,7 +1155,7 @@ void player::tick() { // do latency stuff { - client_info info; + CLIENT_INFO info; if(server_getclientinfo(client_id, &info)) { latency_accum += info.latency; @@ -1201,9 +1199,9 @@ void player::tick() if(!grounded && vel.y > 0) { - if(col_check_point((int)(pos.x-phys_size/2)-4, (int)(pos.y))) + if(input.left && col_check_point((int)(pos.x-phys_size/2)-4, (int)(pos.y))) wall_sliding = -1; - if(col_check_point((int)(pos.x+phys_size/2)+4, (int)(pos.y))) + if(input.right && col_check_point((int)(pos.x+phys_size/2)+4, (int)(pos.y))) wall_sliding = 1; } @@ -2037,7 +2035,7 @@ void mods_client_enter(int client_id) world.insert_entity(&players[client_id]); players[client_id].respawn(); - client_info info; // fetch login name + CLIENT_INFO info; // fetch login name if(server_getclientinfo(client_id, &info)) { strcpy(players[client_id].name, info.name); diff --git a/src/game/server/game_server.h b/src/game/server/game_server.h index 6361b3ea..3722713b 100644 --- a/src/game/server/game_server.h +++ b/src/game/server/game_server.h @@ -42,7 +42,7 @@ public: float proximity_radius; unsigned flags; int objtype; - baselib::vec2 pos; + vec2 pos; enum { @@ -65,7 +65,7 @@ public: virtual void snap(int snapping_client) {} - virtual bool take_damage(baselib::vec2 force, int dmg, int from, int weapon) { return true; } + virtual bool take_damage(vec2 force, int dmg, int from, int weapon) { return true; } }; @@ -86,8 +86,8 @@ public: bool reset_requested; game_world(); - int find_entities(baselib::vec2 pos, float radius, entity **ents, int max); - int find_entities(baselib::vec2 pos, float radius, entity **ents, int max, const int* types, int maxtypes); + int find_entities(vec2 pos, float radius, entity **ents, int max); + int find_entities(vec2 pos, float radius, entity **ents, int max, const int* types, int maxtypes); void insert_entity(entity *ent); void destroy_entity(entity *ent); @@ -156,7 +156,7 @@ public: WEAPON_PROJECTILETYPE_SHOTGUN = 2, }; - baselib::vec2 vel; + vec2 vel; entity *powner; // this is nasty, could be removed when client quits int lifespan; int owner; @@ -168,7 +168,7 @@ public: int bounce; float force; - projectile(int type, int owner, baselib::vec2 pos, baselib::vec2 vel, int span, entity* powner, + projectile(int type, int owner, vec2 pos, vec2 vel, int span, entity* powner, int damage, int flags, float force, int sound_impact, int weapon); virtual void reset(); virtual void tick(); @@ -180,12 +180,12 @@ class projectile_backpackrocket : public projectile int stage; int start_tick; int deply_ticks; - baselib::vec2 target; - baselib::vec2 start; - baselib::vec2 midpoint; - baselib::vec2 direction; + vec2 target; + vec2 start; + vec2 midpoint; + vec2 direction; public: - projectile_backpackrocket(baselib::vec2 pos, baselib::vec2 target, int owner, entity* powner); + projectile_backpackrocket(vec2 pos, vec2 target, int owner, entity* powner); virtual void tick(); }; @@ -225,9 +225,9 @@ public: int last_action; // we need a defered position so we can handle the physics correctly - baselib::vec2 defered_pos; - baselib::vec2 vel; - baselib::vec2 direction; + vec2 defered_pos; + vec2 vel; + vec2 direction; // int client_id; @@ -244,7 +244,7 @@ public: int armor; // ninja - baselib::vec2 activationdir; + vec2 activationdir; int ninjaactivationtick; int extrapowerflags; int currentcooldown; @@ -278,8 +278,8 @@ public: int hook_state; int hook_tick; player *hooked_player; - baselib::vec2 hook_pos; - baselib::vec2 hook_dir; + vec2 hook_pos; + vec2 hook_dir; // player(); @@ -305,7 +305,7 @@ public: void die(int killer, int weapon); - virtual bool take_damage(baselib::vec2 force, int dmg, int from, int weapon); + virtual bool take_damage(vec2 force, int dmg, int from, int weapon); virtual void snap(int snaping_client); }; @@ -317,7 +317,7 @@ class flag : public entity public: static const int phys_size = 14; player *carrying_player; - baselib::vec2 vel; + vec2 vel; int team; int spawntick; |