From 018ca24c62c02dc26bdcfe21c31fae289e7980e8 Mon Sep 17 00:00:00 2001 From: Joseph Carter Date: Sat, 1 Apr 2000 23:40:29 +0000 Subject: [PATCH] flymode WORKS! I'm also poking around a few other qw_server files.. --- common/view.c | 2 +- qw_server/sv_main.c | 10 ---------- qw_server/sv_phys.c | 3 ++- qw_server/sv_send.c | 2 +- qw_server/sv_user.c | 1 + 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/common/view.c b/common/view.c index 3066c44..27109f8 100644 --- a/common/view.c +++ b/common/view.c @@ -758,7 +758,7 @@ V_CalcRefdef ( void ) static float oldz = 0; #ifdef QUAKEWORLD - h = cl.qfserver ? cl.stats[STAT_VIEWHEIGHT] : 22; + h = cl.stats[STAT_VIEWHEIGHT] + 22; #endif V_DriftPitch (); diff --git a/qw_server/sv_main.c b/qw_server/sv_main.c index 8d42aac..f8d1da2 100644 --- a/qw_server/sv_main.c +++ b/qw_server/sv_main.c @@ -50,27 +50,18 @@ netadr_t master_adr[MAX_MASTERS]; // address of group servers client_t *host_client; // current client -//cvar_t sv_maxrate = {"sv_maxrate","0"}; // server maximum rate cvar_t *sv_maxrate; -//cvar_t sv_mintic = {"sv_mintic","0.03"}; // bound the size of the cvar_t *sv_mintic; -//cvar_t sv_maxtic = {"sv_maxtic","0.1"}; // physics time tic cvar_t *sv_maxtic; -//cvar_t developer = {"developer","0"}; // show extra messages cvar_t *developer; -//cvar_t timeout = {"timeout","65"}; // seconds without any message cvar_t *timeout; -//cvar_t zombietime = {"zombietime", "2"}; // seconds to sink messages cvar_t *zombietime; // after disconnect -//cvar_t rcon_password = {"rcon_password", ""}; // password for remote server commands cvar_t *rcon_password; -//cvar_t password = {"password", ""}; // password for entering the game cvar_t *password; -//cvar_t spectator_password = {"spectator_password", ""}; // password for entering as a sepctator cvar_t *spectator_password; cvar_t *allow_download; @@ -104,7 +95,6 @@ cvar_t *watervis; int current_skill; -//cvar_t hostname = {"hostname","unnamed", CVAR_USERINFO|CVAR_SERVERINFO}; cvar_t *hostname; extern cvar_t *cl_warncmd; diff --git a/qw_server/sv_phys.c b/qw_server/sv_phys.c index bce0ac5..e3474c9 100644 --- a/qw_server/sv_phys.c +++ b/qw_server/sv_phys.c @@ -805,7 +805,7 @@ void SV_Physics_Step (edict_t *ent) { qboolean hitsound; -// frefall if not onground +// freefall if not onground if ( ! ((int)ent->v.flags & (FL_ONGROUND | FL_FLY | FL_SWIM) ) ) { if (ent->v.velocity[2] < movevars.gravity*-0.1) @@ -856,6 +856,7 @@ void SV_RunEntity (edict_t *ent) switch ( (int)ent->v.movetype) { + case MOVETYPE_WALK: case MOVETYPE_PUSH: SV_Physics_Pusher (ent); break; diff --git a/qw_server/sv_send.c b/qw_server/sv_send.c index 4e8702d..0890cef 100644 --- a/qw_server/sv_send.c +++ b/qw_server/sv_send.c @@ -556,7 +556,7 @@ void SV_UpdateClientStats (client_t *client) stats[STAT_ITEMS] = (int)ent->v.items | ((int)pr_global_struct->serverflags << 28); // Extensions to the QW 2.40 protocol for MegaTF - stats[STAT_VIEWHEIGHT] = (int)ent->v.view_ofs[2]; + stats[STAT_VIEWHEIGHT] = (int)ent->v.view_ofs[2] - 22; stats[STAT_FLYMODE] = (ent->v.movetype == MOVETYPE_FLY); for (i=0 ; iv.velocity, pmove.velocity); VectorCopy (sv_player->v.v_angle, pmove.angles); + pmove.flying = sv_player->v.movetype == MOVETYPE_FLY; pmove.spectator = host_client->spectator; pmove.waterjumptime = sv_player->v.teleport_time; pmove.numphysent = 1;