mirror of
https://github.com/yquake2/xatrix.git
synced 2025-02-23 20:31:40 +00:00
Fix several warnings to enable a clean Windows build
This commit is contained in:
parent
00fa861edc
commit
834e3c7846
8 changed files with 1 additions and 41 deletions
|
@ -7,7 +7,6 @@ void UpdateChaseCam(edict_t *ent)
|
||||||
vec3_t forward, right;
|
vec3_t forward, right;
|
||||||
trace_t trace;
|
trace_t trace;
|
||||||
int i;
|
int i;
|
||||||
vec3_t oldgoal;
|
|
||||||
vec3_t angles;
|
vec3_t angles;
|
||||||
|
|
||||||
// is our chase target gone?
|
// is our chase target gone?
|
||||||
|
@ -25,7 +24,6 @@ void UpdateChaseCam(edict_t *ent)
|
||||||
targ = ent->client->chase_target;
|
targ = ent->client->chase_target;
|
||||||
|
|
||||||
VectorCopy(targ->s.origin, ownerv);
|
VectorCopy(targ->s.origin, ownerv);
|
||||||
VectorCopy(ent->s.origin, oldgoal);
|
|
||||||
|
|
||||||
ownerv[2] += targ->viewheight;
|
ownerv[2] += targ->viewheight;
|
||||||
|
|
||||||
|
|
12
src/g_func.c
12
src/g_func.c
|
@ -395,10 +395,7 @@ void plat_blocked (edict_t *self, edict_t *other)
|
||||||
if (other)
|
if (other)
|
||||||
{
|
{
|
||||||
/* Hack for entity without it's origin near the model */
|
/* Hack for entity without it's origin near the model */
|
||||||
vec3_t save;
|
|
||||||
VectorCopy(other->s.origin,save);
|
|
||||||
VectorMA (other->absmin, 0.5, other->size, other->s.origin);
|
VectorMA (other->absmin, 0.5, other->size, other->s.origin);
|
||||||
|
|
||||||
BecomeExplosion1(other);
|
BecomeExplosion1(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1075,10 +1072,7 @@ void door_blocked (edict_t *self, edict_t *other)
|
||||||
if (other)
|
if (other)
|
||||||
{
|
{
|
||||||
/* Hack for entitiy without their origin near the model */
|
/* Hack for entitiy without their origin near the model */
|
||||||
vec3_t save;
|
|
||||||
VectorCopy(other->s.origin,save);
|
|
||||||
VectorMA (other->absmin, 0.5, other->size, other->s.origin);
|
VectorMA (other->absmin, 0.5, other->size, other->s.origin);
|
||||||
|
|
||||||
BecomeExplosion1(other);
|
BecomeExplosion1(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1466,10 +1460,7 @@ void train_blocked (edict_t *self, edict_t *other)
|
||||||
if (other)
|
if (other)
|
||||||
{
|
{
|
||||||
/* Hack for entity without an origin near the model */
|
/* Hack for entity without an origin near the model */
|
||||||
vec3_t save;
|
|
||||||
VectorCopy(other->s.origin,save);
|
|
||||||
VectorMA (other->absmin, 0.5, other->size, other->s.origin);
|
VectorMA (other->absmin, 0.5, other->size, other->s.origin);
|
||||||
|
|
||||||
BecomeExplosion1(other);
|
BecomeExplosion1(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1952,10 +1943,7 @@ void door_secret_blocked (edict_t *self, edict_t *other)
|
||||||
if (other)
|
if (other)
|
||||||
{
|
{
|
||||||
/* Hack for entities without their origin near the model */
|
/* Hack for entities without their origin near the model */
|
||||||
vec3_t save;
|
|
||||||
VectorCopy(other->s.origin,save);
|
|
||||||
VectorMA (other->absmin, 0.5, other->size, other->s.origin);
|
VectorMA (other->absmin, 0.5, other->size, other->s.origin);
|
||||||
|
|
||||||
BecomeExplosion1(other);
|
BecomeExplosion1(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -494,7 +494,6 @@ qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||||
{
|
{
|
||||||
int i, e;
|
int i, e;
|
||||||
edict_t *check, *block;
|
edict_t *check, *block;
|
||||||
vec3_t mins, maxs;
|
|
||||||
pushed_t *p;
|
pushed_t *p;
|
||||||
vec3_t org, org2, move2, forward, right, up;
|
vec3_t org, org2, move2, forward, right, up;
|
||||||
vec3_t realmins, realmaxs;
|
vec3_t realmins, realmaxs;
|
||||||
|
@ -512,13 +511,6 @@ qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||||
move[i] = 0.125 * (int)temp;
|
move[i] = 0.125 * (int)temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// find the bounding box
|
|
||||||
for (i=0 ; i<3 ; i++)
|
|
||||||
{
|
|
||||||
mins[i] = pusher->absmin[i] + move[i];
|
|
||||||
maxs[i] = pusher->absmax[i] + move[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
// we need this for pushing things later
|
// we need this for pushing things later
|
||||||
VectorSubtract (vec3_origin, amove, org);
|
VectorSubtract (vec3_origin, amove, org);
|
||||||
AngleVectors (org, forward, right, up);
|
AngleVectors (org, forward, right, up);
|
||||||
|
|
|
@ -1044,7 +1044,6 @@ void heat_think (edict_t *self)
|
||||||
edict_t *target = NULL;
|
edict_t *target = NULL;
|
||||||
edict_t *aquire = NULL;
|
edict_t *aquire = NULL;
|
||||||
vec3_t vec;
|
vec3_t vec;
|
||||||
vec3_t oldang;
|
|
||||||
int len;
|
int len;
|
||||||
int oldlen = 0;
|
int oldlen = 0;
|
||||||
|
|
||||||
|
@ -1081,11 +1080,8 @@ void heat_think (edict_t *self)
|
||||||
|
|
||||||
if (aquire != NULL)
|
if (aquire != NULL)
|
||||||
{
|
{
|
||||||
VectorCopy (self->s.angles, oldang);
|
|
||||||
VectorSubtract (aquire->s.origin, self->s.origin, vec);
|
VectorSubtract (aquire->s.origin, self->s.origin, vec);
|
||||||
|
|
||||||
vectoangles (vec, self->s.angles);
|
vectoangles (vec, self->s.angles);
|
||||||
|
|
||||||
VectorNormalize (vec);
|
VectorNormalize (vec);
|
||||||
VectorCopy (vec, self->movedir);
|
VectorCopy (vec, self->movedir);
|
||||||
VectorScale (vec, 500, self->velocity);
|
VectorScale (vec, 500, self->velocity);
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
typedef enum {false, true} qboolean;
|
typedef enum {false, true} qboolean;
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL ((void *)0)
|
#define NULL ((void *)0)
|
||||||
|
|
|
@ -511,10 +511,6 @@ void jorg_firebullet (edict_t *self)
|
||||||
|
|
||||||
void jorg_attack(edict_t *self)
|
void jorg_attack(edict_t *self)
|
||||||
{
|
{
|
||||||
vec3_t vec;
|
|
||||||
|
|
||||||
VectorSubtract (self->enemy->s.origin, self->s.origin, vec);
|
|
||||||
|
|
||||||
if (random() <= 0.75)
|
if (random() <= 0.75)
|
||||||
{
|
{
|
||||||
gi.sound (self, CHAN_VOICE, sound_attack1, 1, ATTN_NORM,0);
|
gi.sound (self, CHAN_VOICE, sound_attack1, 1, ATTN_NORM,0);
|
||||||
|
|
|
@ -588,13 +588,9 @@ void makron_sight(edict_t *self, edict_t *other)
|
||||||
|
|
||||||
void makron_attack(edict_t *self)
|
void makron_attack(edict_t *self)
|
||||||
{
|
{
|
||||||
vec3_t vec;
|
|
||||||
float r;
|
float r;
|
||||||
|
|
||||||
r = random();
|
r = random();
|
||||||
|
|
||||||
VectorSubtract (self->enemy->s.origin, self->s.origin, vec);
|
|
||||||
|
|
||||||
if (r <= 0.3)
|
if (r <= 0.3)
|
||||||
self->monsterinfo.currentmove = &makron_move_attack3;
|
self->monsterinfo.currentmove = &makron_move_attack3;
|
||||||
else if (r <= 0.6)
|
else if (r <= 0.6)
|
||||||
|
|
|
@ -1115,8 +1115,6 @@ void fixbot_fire_welder (edict_t *self)
|
||||||
{
|
{
|
||||||
vec3_t start;
|
vec3_t start;
|
||||||
vec3_t forward, right, up;
|
vec3_t forward, right, up;
|
||||||
vec3_t end;
|
|
||||||
vec3_t dir;
|
|
||||||
vec3_t vec;
|
vec3_t vec;
|
||||||
float r;
|
float r;
|
||||||
|
|
||||||
|
@ -1131,10 +1129,6 @@ void fixbot_fire_welder (edict_t *self)
|
||||||
AngleVectors (self->s.angles, forward, right, up);
|
AngleVectors (self->s.angles, forward, right, up);
|
||||||
G_ProjectSource (self->s.origin, vec, forward, right, start);
|
G_ProjectSource (self->s.origin, vec, forward, right, start);
|
||||||
|
|
||||||
VectorCopy (self->enemy->s.origin, end);
|
|
||||||
|
|
||||||
VectorSubtract (end, start, dir);
|
|
||||||
|
|
||||||
gi.WriteByte (svc_temp_entity);
|
gi.WriteByte (svc_temp_entity);
|
||||||
gi.WriteByte (TE_WELDING_SPARKS);
|
gi.WriteByte (TE_WELDING_SPARKS);
|
||||||
gi.WriteByte (10);
|
gi.WriteByte (10);
|
||||||
|
|
Loading…
Reference in a new issue