0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-04-14 13:21:43 +00:00

[client] Use vec4_t in entity_state_t

And clean up the mess (sort of:P)
This commit is contained in:
Bill Currie 2021-03-11 16:19:49 +09:00
parent 36761192a6
commit 8466de2325
25 changed files with 106 additions and 94 deletions

View file

@ -35,7 +35,7 @@
struct entity_s;
struct entity_state_s;
void CL_NewDlight (int key, vec3_t org, int effects, byte glow_size,
void CL_NewDlight (int key, vec4f_t org, int effects, byte glow_size,
byte glow_color, double time);
void CL_ModelEffects (struct entity_s *ent, int num, int glow_color,
double time);

View file

@ -32,6 +32,7 @@
#define __client_entities_h
#include "QF/qtypes.h"
#include "QF/simd/types.h"
// entity_state_t is the information conveyed from the server
// in an update message
@ -39,8 +40,8 @@ typedef struct entity_state_s {
int number; // edict index
unsigned flags; // nolerp, etc
vec3_t origin;
vec3_t velocity;
vec4f_t origin;
vec4f_t velocity;
vec3_t angles;
uint16_t modelindex;
uint16_t frame;

View file

@ -29,23 +29,24 @@
#define __QF_locs_h
#include "QF/qtypes.h"
#include "QF/simd/types.h"
typedef struct
{
vec3_t loc;
char *name;
vec4f_t loc;
char *name;
} location_t;
location_t *locs_find(const vec3_t target) __attribute__((pure));
void locs_add (const vec3_t location, const char *name);
void locs_del (const vec3_t loc);
void locs_edit (const vec3_t loc, const char *desc);
location_t *locs_find(vec4f_t target) __attribute__((pure));
void locs_add (vec4f_t location, const char *name);
void locs_del (vec4f_t loc);
void locs_edit (vec4f_t loc, const char *desc);
void locs_load(const char *filename);
void locs_mark (const vec3_t loc, const char *desc);
int locs_nearest (const vec3_t loc) __attribute__((pure));
void locs_mark (vec4f_t loc, const char *desc);
int locs_nearest (vec4f_t loc) __attribute__((pure));
void locs_reset (void);
void locs_save (const char *filename, qboolean gz);
void map_to_loc (const char *mapname, char *filename);
void locs_draw (vec3_t simorg);
void locs_draw (vec4f_t simorg);
#endif//__QF_locs_h

View file

@ -30,6 +30,7 @@
#define __clview_h_
#include "QF/mathlib.h"
#include "QF/simd/types.h"
#define INFO_CSHIFT_BONUS (1 << 0)
#define INFO_CSHIFT_CONTENTS (1 << 1)
@ -39,7 +40,7 @@
void V_Init (void);
void V_Init_Cvars (void);
void V_RenderView (void);
float V_CalcRoll (const vec3_t angles, const vec3_t velocity);
float V_CalcRoll (const vec3_t angles, vec4f_t velocity);
void V_UpdatePalette (void);
void V_StartPitchDrift (void);
void V_StopPitchDrift (void);

View file

@ -47,7 +47,7 @@
#include "client/effects.h"
void
CL_NewDlight (int key, vec3_t org, int effects, byte glow_size,
CL_NewDlight (int key, vec4f_t org, int effects, byte glow_size,
byte glow_color, double time)
{
float radius;

View file

@ -48,6 +48,8 @@
#include "QF/sys.h"
#include "QF/va.h"
#include "QF/simd/vec4f.h"
#include "QF/plugin/vid_render.h" //FIXME
#include "compat.h"
@ -63,7 +65,7 @@ int locations_count = 0;
int location_blocks = 0;
int
locs_nearest (const vec3_t loc)
locs_nearest (vec4f_t loc)
{
float best_distance = 9999999, distance;
int i, j = -1;
@ -71,7 +73,8 @@ locs_nearest (const vec3_t loc)
for (i = 0; i < locations_count; i++) {
cur = locations[i];
distance = VectorDistance_fast (loc, cur->loc);
vec4f_t d = loc - cur->loc;
distance = dotf (d, d)[0];
if ((distance < best_distance)) {
best_distance = distance;
j = i;
@ -81,7 +84,7 @@ locs_nearest (const vec3_t loc)
}
location_t *
locs_find (const vec3_t target)
locs_find (vec4f_t target)
{
int i;
@ -110,7 +113,7 @@ locs_more (void)
}
void
locs_add (const vec3_t location, const char *name)
locs_add (vec4f_t location, const char *name)
{
int num;
@ -137,7 +140,7 @@ locs_load (const char *filename)
const char *tmp;
char *t1, *t2;
const char *line;
vec3_t loc;
vec4f_t loc;
QFile *file;
tmp = va (0, "maps/%s", filename);
@ -216,7 +219,7 @@ locs_save (const char *filename, qboolean gz)
}
void
locs_mark (const vec3_t loc, const char *desc)
locs_mark (vec4f_t loc, const char *desc)
{
locs_add (loc, desc);
Sys_Printf ("Marked current location: %s\n", desc);
@ -229,14 +232,14 @@ locs_mark (const vec3_t loc, const char *desc)
call with NULL description to modify location vectors
*/
void
locs_edit (const vec3_t loc, const char *desc)
locs_edit (vec4f_t loc, const char *desc)
{
int i;
if (locations_count) {
i = locs_nearest (loc);
if (!desc) {
VectorCopy (loc, locations[i]->loc);
locations[i]->loc = loc;
Sys_Printf ("Moving location marker for %s\n",
locations[i]->name);
} else {
@ -250,7 +253,7 @@ locs_edit (const vec3_t loc, const char *desc)
}
void
locs_del (const vec3_t loc)
locs_del (vec4f_t loc)
{
int i;
@ -282,12 +285,12 @@ map_to_loc (const char *mapname, char *filename)
}
void
locs_draw (vec3_t simorg)
locs_draw (vec4f_t simorg)
{
//FIXME custom ent rendering code would be nice
dlight_t *dl;
location_t *nearloc;
vec3_t trueloc;
vec4f_t trueloc;
int i;
nearloc = locs_find (simorg);
@ -302,14 +305,14 @@ locs_draw (vec3_t simorg)
dl->color[2] = 0;
dl->color[3] = 0.7;
}
VectorCopy (nearloc->loc, trueloc);
trueloc = nearloc->loc;
r_funcs->particles->R_Particle_New (pt_smokecloud, part_tex_smoke,
trueloc, 2.0,
&trueloc[0], 2.0,//FIXME
vec3_origin, r_data->realtime + 9.0, 254,
0.25 + qfrandom (0.125), 0.0);
for (i = 0; i < 15; i++)
r_funcs->particles->R_Particle_NewRandom (pt_fallfade,
part_tex_dot, trueloc, 12,
part_tex_dot, &trueloc[0], 12,//FIXME
0.7, 96, r_data->realtime + 5.0,
104 + (rand () & 7), 1.0, 0.0);
}

View file

@ -162,13 +162,13 @@ typedef struct {
// server each frame. The server sets punchangle when the view is temporarily
// offset, and an angle reset commands at the start of each level and after
// teleporting.
int mindex;
vec3_t mviewangles[2]; // During demo playback viewangles is lerped
int frameIndex;
vec3_t frameViewAngles[2]; // During demo playback viewangles is lerped
// between these
vec3_t viewangles;
vec3_t mvelocity[2]; // Update by server, used for lean+bob
vec4f_t frameVelocity[2]; // Update by server, used for lean+bob
// (0 is newest)
vec3_t velocity; // Lerped between mvelocity[0] and [1]
vec4f_t velocity; // Lerped between frameVelocity[0] and [1]
vec3_t punchangle; // Temporary offset
// pitch drifting vars

View file

@ -182,14 +182,14 @@ read_demopacket (void)
if (net_message->message->cursize > MAX_DEMMSG)
Host_Error ("Demo message > MAX_DEMMSG: %d/%d",
net_message->message->cursize, MAX_DEMMSG);
VectorCopy (cl.mviewangles[0], cl.mviewangles[1]);
VectorCopy (cl.frameViewAngles[0], cl.frameViewAngles[1]);
for (i = 0; i < 3; i++) {
r = Qread (cls.demofile, &f, 4);
if (r != 4) {
CL_StopPlayback ();
return 0;
}
cl.mviewangles[0][i] = LittleFloat (f);
cl.frameViewAngles[0][i] = LittleFloat (f);
}
r = Qread (cls.demofile, net_message->message->data,
net_message->message->cursize);

View file

@ -156,19 +156,18 @@ CL_RelinkEntities (void)
frac = CL_LerpPoint ();
// interpolate player info
for (i = 0; i < 3; i++)
cl.velocity[i] = cl.mvelocity[1][i] +
frac * (cl.mvelocity[0][i] - cl.mvelocity[1][i]);
cl.velocity = cl.frameVelocity[1]
+ frac * (cl.frameVelocity[0] - cl.frameVelocity[1]);
if (cls.demoplayback) {
// interpolate the angles
for (j = 0; j < 3; j++) {
d = cl.mviewangles[0][j] - cl.mviewangles[1][j];
d = cl.frameViewAngles[0][j] - cl.frameViewAngles[1][j];
if (d > 180)
d -= 360;
else if (d < -180)
d += 360;
cl.viewangles[j] = cl.mviewangles[1][j] + frac * d;
cl.viewangles[j] = cl.frameViewAngles[1][j] + frac * d;
}
}
@ -176,8 +175,8 @@ CL_RelinkEntities (void)
// start on the entity after the world
for (i = 1; i < cl.num_entities; i++) {
new = &nq_entstates.frame[0 + cl.mindex][i];
old = &nq_entstates.frame[1 - cl.mindex][i];
new = &nq_entstates.frame[0 + cl.frameIndex][i];
old = &nq_entstates.frame[1 - cl.frameIndex][i];
ent = &cl_entities[i];
renderer = &ent->renderer;
animation = &ent->animation;
@ -293,7 +292,8 @@ CL_RelinkEntities (void)
CL_TransformEntity (ent, angles);
}
CL_EntityEffects (i, ent, new, cl.time);
CL_NewDlight (i, ent->origin, new->effects, new->glow_size,
vec4f_t org = { VectorExpand (ent->origin), 1}; //FIXME
CL_NewDlight (i, org, new->effects, new->glow_size,
new->glow_color, cl.time);
if (VectorDistance_fast (old->origin, ent->origin) > (256 * 256))
VectorCopy (ent->origin, old->origin);

View file

@ -491,7 +491,7 @@ CL_ParseUpdate (int bits)
num = MSG_ReadByte (net_message);
baseline = CL_EntityNum (num);
state = &nq_entstates.frame[0 + cl.mindex][num];
state = &nq_entstates.frame[0 + cl.frameIndex][num];
for (i = 0; i < 16; i++)
if (bits & (1 << i))
@ -620,7 +620,8 @@ CL_ParseBaseline (entity_state_t *baseline, int version)
baseline->colormap = MSG_ReadByte (net_message);
baseline->skinnum = MSG_ReadByte (net_message);
MSG_ReadCoordAngleV (net_message, baseline->origin, baseline->angles);
MSG_ReadCoordAngleV (net_message, &baseline->origin[0], baseline->angles);
baseline->origin[3] = 1;//FIXME
if (bits & B_ALPHA)
baseline->alpha = MSG_ReadByte (net_message);
@ -659,17 +660,17 @@ CL_ParseClientdata (void)
else
cl.idealpitch = 0;
VectorCopy (cl.mvelocity[0], cl.mvelocity[1]);
cl.frameVelocity[1] = cl.frameVelocity[0];
for (i = 0; i < 3; i++) {
if (bits & (SU_PUNCH1 << i))
cl.punchangle[i] = ((signed char) MSG_ReadByte (net_message));
else
cl.punchangle[i] = 0;
if (bits & (SU_VELOCITY1 << i))
cl.mvelocity[0][i] = ((signed char) MSG_ReadByte (net_message))
cl.frameVelocity[0][i] = ((signed char) MSG_ReadByte (net_message))
* 16;
else
cl.mvelocity[0][i] = 0;
cl.frameVelocity[0][i] = 0;
}
//FIXME
@ -918,7 +919,7 @@ CL_ParseServerMessage (void)
case svc_time:
cl.mtime[1] = cl.mtime[0];
cl.mtime[0] = MSG_ReadFloat (net_message);
cl.mindex = !cl.mindex;
cl.frameIndex = !cl.frameIndex;
break;
case svc_print:

View file

@ -33,6 +33,8 @@
#include "QF/msg.h"
#include "QF/screen.h"
#include "QF/simd/vec4f.h"
#include "QF/plugin/vid_render.h"
#include "compat.h"
@ -87,7 +89,7 @@ cshift_t cshift_bonus = { {215, 186, 60}, 50};
#define sqr(x) ((x) * (x))
float
V_CalcRoll (const vec3_t angles, const vec3_t velocity)
V_CalcRoll (const vec3_t angles, vec4f_t velocity)
{
float side, sign, value;
vec3_t forward, right, up;
@ -110,7 +112,7 @@ V_CalcRoll (const vec3_t angles, const vec3_t velocity)
static float
V_CalcBob (void)
{
vec_t *velocity = cl.velocity;
vec4f_t velocity = cl.velocity;
float cycle;
static double bobtime;
static float bob;
@ -132,8 +134,8 @@ V_CalcBob (void)
// bob is proportional to velocity in the xy plane
// (don't count Z, or jumping messes it up)
bob = sqrt (sqr (velocity[0]) + sqr (velocity[1])) * cl_bob->value;
velocity[2] = 0;
bob = sqrt (dotf (velocity, velocity)[0]) * cl_bob->value;
bob = bob * 0.3 + bob * 0.7 * sin (cycle * M_PI);
if (bob > 4)
bob = 4;
@ -582,7 +584,7 @@ V_CalcViewRoll (void)
{
float side;
vec_t *angles = cl_entities[cl.viewentity].angles;
vec_t *velocity = cl.velocity;
vec4f_t velocity = cl.velocity;
side = V_CalcRoll (angles, velocity);
r_data->refdef->viewangles[ROLL] += side;

View file

@ -1037,7 +1037,8 @@ SV_CreateBaseline (void)
MSG_WriteByte (&sv.signon, baseline->colormap);
MSG_WriteByte (&sv.signon, baseline->skinnum);
MSG_WriteCoordAngleV (&sv.signon, baseline->origin, baseline->angles);
MSG_WriteCoordAngleV (&sv.signon, &baseline->origin[0],//FIXME
baseline->angles);
if (bits & B_ALPHA)
MSG_WriteByte (&sv.signon, baseline->alpha);

View file

@ -682,7 +682,8 @@ write_player (int num, plent_state_t *pl, server_t *sv, sizebuf_t *msg)
MSG_WriteByte (msg, num);
MSG_WriteShort (msg, pflags);
MSG_WriteCoordV (msg, pl->es.origin);
MSG_WriteCoordV (msg, &pl->es.origin[0]);//FIXME
pl->es.origin[3] = 1;
MSG_WriteByte (msg, pl->es.frame);

View file

@ -515,7 +515,7 @@ parse_player_delta (qmsg_t *msg, plent_state_t *from, plent_state_t *to)
int flags;
flags = to->es.flags = MSG_ReadShort (msg);
MSG_ReadCoordV (msg, to->es.origin);
MSG_ReadCoordV (msg, &to->es.origin[0]);
to->es.frame = (to->es.frame & 0xff00) | MSG_ReadByte (msg);
if (flags & PF_MSEC)
to->msec = MSG_ReadByte (msg);
@ -752,7 +752,8 @@ parse_baseline (qmsg_t *msg, entity_state_t *ent)
ent->frame = MSG_ReadByte (msg);
ent->colormap = MSG_ReadByte (msg);
ent->skinnum = MSG_ReadByte (msg);
MSG_ReadCoordAngleV (msg, ent->origin, ent->angles);
MSG_ReadCoordAngleV (msg, &ent->origin[0], ent->angles); //FIXME
ent->origin[3] = 1;
ent->colormod = 255;
ent->alpha = 255;
ent->scale = 16;

View file

@ -222,8 +222,8 @@ typedef struct {
// the client simulates or interpolates movement to get these values
double time; // this is the time value that the client
// is rendering at. always <= realtime
vec3_t simorg;
vec3_t simvel;
vec4f_t simorg;
vec4f_t simvel;
vec3_t simangles;
vec3_t punchangle; // temporary view kick from weapon firing

View file

@ -221,7 +221,7 @@ Cam_TryFlyby (player_state_t * self, player_state_t * player, vec3_t vec,
VectorMultAdd (player->pls.es.origin, 800, vec, v);
// v is endpos
// fake a player move
trace = Cam_DoTrace (player->pls.es.origin, v);
trace = Cam_DoTrace (&player->pls.es.origin[0], v);//FIXME
if ( /* trace.inopen || */ trace.inwater)
return 9999;
VectorCopy (trace.endpos, vec);
@ -230,7 +230,7 @@ Cam_TryFlyby (player_state_t * self, player_state_t * player, vec3_t vec,
if (len < 32 || len > 800)
return 9999;
if (checkvis) {
trace = Cam_DoTrace (self->pls.es.origin, vec);
trace = Cam_DoTrace (&self->pls.es.origin[0], vec);//FIXME
if (trace.fraction != 1 || trace.inwater)
return 9999;
@ -242,13 +242,13 @@ Cam_TryFlyby (player_state_t * self, player_state_t * player, vec3_t vec,
// Is player visible?
static qboolean
Cam_IsVisible (player_state_t * player, vec3_t vec)
Cam_IsVisible (player_state_t *player, vec3_t vec)
{
float d;
trace_t trace;
vec3_t v;
trace = Cam_DoTrace (player->pls.es.origin, vec);
trace = Cam_DoTrace (&player->pls.es.origin[0], vec);//FIXME
if (trace.fraction != 1 || /* trace.inopen || */ trace.inwater)
return false;
// check distance, don't let the player get too far away or too close

View file

@ -797,7 +797,7 @@ demo_start_recording (int track)
MSG_WriteByte (&buf, es->frame);
MSG_WriteByte (&buf, es->colormap);
MSG_WriteByte (&buf, es->skinnum);
MSG_WriteCoordAngleV (&buf, es->origin, es->angles);
MSG_WriteCoordAngleV (&buf, &es->origin[0], es->angles);//FIXME
if (buf.cursize > MAX_MSGLEN / 2) {
CL_WriteRecordDemoMessage (&buf, seq++);

View file

@ -427,7 +427,7 @@ CL_ParsePlayerinfo (void)
flags = state->pls.es.flags = MSG_ReadShort (net_message);
state->messagenum = cl.parsecount;
MSG_ReadCoordV (net_message, state->pls.es.origin);
MSG_ReadCoordV (net_message, &state->pls.es.origin[0]);//FIXME
state->pls.es.frame = MSG_ReadByte (net_message);

View file

@ -356,7 +356,8 @@ CL_LinkPlayers (void)
player_state_t exact;
player_state_t *state;
qboolean clientplayer;
vec3_t org, ang = {0, 0, 0};
vec3_t ang = {0, 0, 0};
vec4f_t org;
playertime = realtime - cls.latency + 0.02;
if (playertime > realtime)
@ -377,11 +378,11 @@ CL_LinkPlayers (void)
// spawn light flashes, even ones coming from invisible objects
if (j == cl.playernum) {
VectorCopy (cl.simorg, org);
org = cl.simorg;
r_data->player_entity = &cl_player_ents[j];
clientplayer = true;
} else {
VectorCopy (state->pls.es.origin, org);
org = state->pls.es.origin;
clientplayer = false;
}
if (info->chat && info->chat->value[0] != '0') {

View file

@ -945,7 +945,8 @@ CL_ParseBaseline (entity_state_t *es)
es->colormap = MSG_ReadByte (net_message);
es->skinnum = MSG_ReadByte (net_message);
MSG_ReadCoordAngleV (net_message, es->origin, es->angles);
MSG_ReadCoordAngleV (net_message, &es->origin[0], es->angles);//FIXME
es->origin[3] = 1;
// LordHavoc: set up baseline to for new effects (alpha, colormod, etc)
es->colormod = 255;
@ -1541,7 +1542,8 @@ CL_ParseServerMessage (void)
cl.completed_time = realtime;
r_data->vid->recalc_refdef = true; // go to full screen
Sys_MaskPrintf (SYS_DEV, "intermission simorg: ");
MSG_ReadCoordV (net_message, cl.simorg);
MSG_ReadCoordV (net_message, &cl.simorg[0]);//FIXME
cl.simorg[3] = 1;
for (i = 0; i < 3; i++)
Sys_MaskPrintf (SYS_DEV, "%f ", cl.simorg[i]);
Sys_MaskPrintf (SYS_DEV, "\nintermission simangles: ");

View file

@ -184,14 +184,9 @@ CL_PredictMove (void)
return;
}
for (i = 0; i < 3; i++) {
cl.simorg[i] = from->playerstate[cl.playernum].pls.es.origin[i] +
f * (to->playerstate[cl.playernum].pls.es.origin[i] -
from->playerstate[cl.playernum].pls.es.origin[i]);
cl.simvel[i] = from->playerstate[cl.playernum].pls.es.velocity[i] +
f * (to->playerstate[cl.playernum].pls.es.velocity[i] -
from->playerstate[cl.playernum].pls.es.velocity[i]);
}
cl.simorg = from->playerstate[cl.playernum].pls.es.origin
+ f * (to->playerstate[cl.playernum].pls.es.origin -
from->playerstate[cl.playernum].pls.es.origin);
}
void

View file

@ -33,6 +33,8 @@
#include "QF/msg.h"
#include "QF/screen.h"
#include "QF/simd/vec4f.h"
#include "compat.h"
#include "clview.h"
@ -93,7 +95,7 @@ cshift_t cshift_bonus = { {215, 186, 60}, 50};
#define sqr(x) ((x) * (x))
float
V_CalcRoll (const vec3_t angles, const vec3_t velocity)
V_CalcRoll (const vec3_t angles, const vec4f_t velocity)
{
float side, sign, value;
vec3_t forward, right, up;
@ -116,7 +118,7 @@ V_CalcRoll (const vec3_t angles, const vec3_t velocity)
static float
V_CalcBob (void)
{
vec_t *velocity = cl.simvel;
vec4f_t velocity = cl.simvel;
float cycle;
static double bobtime;
static float bob;
@ -138,8 +140,8 @@ V_CalcBob (void)
// bob is proportional to velocity in the xy plane
// (don't count Z, or jumping messes it up)
bob = sqrt (sqr (velocity[0]) + sqr (velocity[1])) * cl_bob->value;
velocity[2] = 0;
bob = sqrt (dotf (velocity, velocity)[0]) * cl_bob->value;
bob = bob * 0.3 + bob * 0.7 * sin (cycle * M_PI);
if (bob > 4)
bob = 4;
@ -240,7 +242,7 @@ V_ParseDamage (void)
{
float count, side;
int armor, blood;
vec_t *origin = cl.simorg;
vec4f_t origin = cl.simorg;
vec_t *angles = cl.simangles;
vec3_t from, forward, right, up;
@ -535,7 +537,7 @@ CalcGunAngle (void)
static void
V_BoundOffsets (void)
{
vec_t *origin = cl.simorg;
vec4f_t origin = cl.simorg;
// absolutely bound refresh reletive to entity clipping hull
// so the view can never be inside a solid wall
@ -587,7 +589,7 @@ V_CalcViewRoll (void)
{
float side;
vec_t *angles = cl.simangles;
vec_t *velocity = cl.simvel;
vec4f_t velocity = cl.simvel;
side = V_CalcRoll (angles, velocity);
r_data->refdef->viewangles[ROLL] += side;
@ -609,7 +611,7 @@ V_CalcIntermissionRefdef (void)
{
entity_t *view;
float old;
vec_t *origin = cl.simorg;
vec4f_t origin = cl.simorg;
vec_t *angles = cl.simangles;
// view is the weapon model (visible only from inside body)
@ -635,7 +637,7 @@ V_CalcRefdef (void)
static float oldz = 0;
int i;
vec3_t forward, right, up;
vec_t *origin = cl.simorg;
vec4f_t origin = cl.simorg;
vec_t *viewangles = cl.simangles;
V_DriftPitch ();

View file

@ -509,7 +509,7 @@ write_player (delta_t *delta, plent_state_t *from, plent_state_t *to,
MSG_WriteByte (msg, to->es.number);
MSG_WriteShort (msg, flags);
MSG_WriteCoordV (msg, to->es.origin);
MSG_WriteCoordV (msg, &to->es.origin[0]);//FIXME
MSG_WriteByte (msg, to->es.frame);

View file

@ -167,8 +167,8 @@ SV_CreateBaseline (void)
MSG_WriteByte (&sv.signon, SVdata (svent)->state.colormap);
MSG_WriteByte (&sv.signon, SVdata (svent)->state.skinnum);
MSG_WriteCoordAngleV (&sv.signon, SVdata (svent)->state.origin,
SVdata (svent)->state.angles);
MSG_WriteCoordAngleV (&sv.signon, &SVdata (svent)->state.origin[0],
SVdata (svent)->state.angles);//FIXME
}
}

View file

@ -58,7 +58,7 @@
#include "qw/include/client.h"
static qboolean died = false, recorded_location = false;
static vec3_t death_location, last_recorded_location;
static vec4f_t death_location, last_recorded_location;
cvar_t *cl_deadbodyfilter;
cvar_t *cl_gibfilter;
@ -165,7 +165,7 @@ Team_ParseSay (dstring_t *buf, const char *s)
location = locs_find (death_location);
if (location) {
recorded_location = true;
VectorCopy (death_location, last_recorded_location);
last_recorded_location = death_location;
t1 = location->name;
break;
}
@ -187,7 +187,7 @@ Team_ParseSay (dstring_t *buf, const char *s)
location = locs_find (cl.simorg);
if (location) {
recorded_location = true;
VectorCopy (cl.simorg, last_recorded_location);
last_recorded_location = cl.simorg;
t1 = location->name;
} else
snprintf (t2, sizeof (t2), "Unknown!");
@ -279,7 +279,7 @@ void
Team_Dead (void)
{
died = true;
VectorCopy (cl.simorg, death_location);
death_location = cl.simorg;
}
void