Skip to content

Commit

Permalink
game: sync code style of g_func.c
Browse files Browse the repository at this point in the history
  • Loading branch information
0lvin committed Oct 19, 2024
1 parent b879b9f commit 0e9c10e
Show file tree
Hide file tree
Showing 44 changed files with 3,448 additions and 453 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@ GAME_OBJS_ = \
src/game/g_hitlocation.o \
src/game/g_items.o \
src/game/g_light.o \
src/game/g_newai.o \
src/game/g_main.o \
src/game/g_message.o \
src/game/g_misc.o \
Expand Down
2 changes: 1 addition & 1 deletion src/game/common/cl_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ typedef enum
GM_OBIT_HELLSTAFF2 ,

GM_OBIT_P_STAFF = 184,
GM_OBIT_P_STAFF1 ,
GM_OBIT_P_STAFF1 ,
GM_OBIT_P_STAFF2 ,
GM_OBIT_P_FIREBALL ,
GM_OBIT_P_FIREBALL1 ,
Expand Down
2 changes: 1 addition & 1 deletion src/game/effects/fx_halo.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static qboolean FXHaloThink(struct client_entity_s *self, centity_t *Owner)
}
else
{
self->flags &= ~CEF_NO_DRAW;
self->flags &= ~CEF_NO_DRAW;

if (self->alpha < 0.5)
self->alpha += 0.25;
Expand Down
12 changes: 6 additions & 6 deletions src/game/effects/fx_lensflare.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ void FXLensFlare(centity_t *owner,int Type,int Flags,vec3_t Origin)

VectorSet(Explosion->up, 0.0f, 0.0f, 0.0f);

Explosion->r.color.r = tint.r;
Explosion->r.color.g = tint.g;
Explosion->r.color.b = tint.b;
Explosion->r.color.r = tint.r;
Explosion->r.color.g = tint.g;
Explosion->r.color.b = tint.b;
Explosion->alpha=alpha;

switch (I)
Expand Down Expand Up @@ -453,9 +453,9 @@ void FXClientLensFlare(centity_t *owner,int Type,int Flags,vec3_t Origin, int li

VectorSet(Explosion->up, 0.0f, 0.0f, 0.0f);

Explosion->r.color.r = tint->r;
Explosion->r.color.g = tint->g;
Explosion->r.color.b = tint->b;
Explosion->r.color.r = tint->r;
Explosion->r.color.g = tint->g;
Explosion->r.color.b = tint->b;
Explosion->alpha = (float)(tint->a)/255.0;

switch (I)
Expand Down
2 changes: 1 addition & 1 deletion src/game/effects/fx_morph.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static qboolean FXMorphMissileThink(client_entity_t *missile, centity_t *owner)
vec3_t scaled_vel;
client_entity_t *trail;
int count;
paletteRGBA_t color;
paletteRGBA_t color;
vec3_t diff, curpos;
int dur;

Expand Down
4 changes: 2 additions & 2 deletions src/game/effects/fx_shrine.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static qboolean FXShrineLungsThink(struct client_entity_s *self, centity_t *owne
VectorScale(vel, flrand(1.0,LUNG_RAD), vel);
vel[2] = -30.0;

color.c = 0xffffff40;
color.c = 0xffffff40;

ce = ClientParticle_new(PART_32x32_STEAM, color, 450);

Expand Down Expand Up @@ -1077,7 +1077,7 @@ static qboolean FXShrineBallThink(struct client_entity_s *self, centity_t *owner
part = ShrineParticle[self->SpawnInfo][irand(0,1)];

if (part == PART_32x32_STEAM)
color.c = 0xffffff40;
color.c = 0xffffff40;
else
color.c = 0xffffffff;

Expand Down
2 changes: 1 addition & 1 deletion src/game/effects/fx_spellhands.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static qboolean FXSpellHandsThink(struct client_entity_s *Self, centity_t *Owner
vec3_t Trailend,Trailstart;
vec3_t Real_Trailend,Real_Trailstart;
vec3_t TrailDelta;
float TrailLength;
float TrailLength;

client_particle_t *ce;
paletteRGBA_t color;
Expand Down
6 changes: 3 additions & 3 deletions src/game/effects/fx_sphereofannihlation.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ static qboolean FXSphereOfAnnihilationGlowballSpawnerThink(struct client_entity_
flrand(-10.0, 10.0)+ Self->r.origin[2]);
}

VectorCopy(Owner->current.angles,Temp);
VectorScale(Temp,180.0/M_PI,Temp);
AngleVectors(Temp,Forward2,Right2,NULL);
VectorCopy(Owner->current.angles,Temp);
VectorScale(Temp,180.0/M_PI,Temp);
AngleVectors(Temp,Forward2,Right2,NULL);


// Set my velocity and accelaration.
Expand Down
2 changes: 1 addition & 1 deletion src/game/effects/generic_character_effects.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ static qboolean FXFeetTrailThink(struct client_entity_s *self, centity_t *owner)

for(i = 0; i < count; i++)
{
color.c = 0xffffff40;
color.c = 0xffffff40;

flame = ClientParticle_new(PART_32x32_STEAM, color, hand_flame_dur);
VectorSet( flame->origin,
Expand Down
2 changes: 1 addition & 1 deletion src/game/effects/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ AddServerEntities(frame_t *frame)
}
// jmarshall end

VectorCopy(ent->origin, ent->oldorigin);
VectorCopy(ent->origin, ent->oldorigin);
VectorCopy(cent->origin, cent->lerp_origin);

// Set model.
Expand Down
2 changes: 1 addition & 1 deletion src/game/g_combat.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ void T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t pdir,
// be sure we still have some damage
if (!damage)
{
damage = 1;
damage = 1;
armorabsorb = 1;
}
else
Expand Down
Loading

0 comments on commit 0e9c10e

Please sign in to comment.