vkQuake2 doxygen  1.0 dev
p_view.c File Reference
#include "g_local.h"
#include "m_player.h"

Go to the source code of this file.

Functions

float SV_CalcRoll (vec3_t angles, vec3_t velocity)
 
void P_DamageFeedback (edict_t *player)
 
void SV_CalcViewOffset (edict_t *ent)
 
void SV_CalcGunOffset (edict_t *ent)
 
void SV_AddBlend (float r, float g, float b, float a, float *v_blend)
 
void SV_CalcBlend (edict_t *ent)
 
void P_FallingDamage (edict_t *ent)
 
void P_WorldEffects (void)
 
void G_SetClientEffects (edict_t *ent)
 
void G_SetClientEvent (edict_t *ent)
 
void G_SetClientSound (edict_t *ent)
 
void G_SetClientFrame (edict_t *ent)
 
void ClientEndServerFrame (edict_t *ent)
 

Variables

static edict_tcurrent_player
 
static gclient_tcurrent_client
 
static vec3_t forward
 
static vec3_t right
 
static vec3_t up
 
float xyspeed
 
float bobmove
 
int bobcycle
 
float bobfracsin
 

Function Documentation

◆ ClientEndServerFrame()

void ClientEndServerFrame ( edict_t ent)

Definition at line 958 of file p_view.c.

959 {
960  float bobtime;
961  int i;
962 
963  current_player = ent;
964  current_client = ent->client;
965 
966  //
967  // If the origin or velocity have changed since ClientThink(),
968  // update the pmove values. This will happen when the client
969  // is pushed by a bmodel or kicked by an explosion.
970  //
971  // If it wasn't updated here, the view position would lag a frame
972  // behind the body position when pushed -- "sinking into plats"
973  //
974  for (i=0 ; i<3 ; i++)
975  {
976  current_client->ps.pmove.origin[i] = ent->s.origin[i]*8.0;
977  current_client->ps.pmove.velocity[i] = ent->velocity[i]*8.0;
978  }
979 
980  //
981  // If the end of unit layout is displayed, don't give
982  // the player any normal movement attributes
983  //
984  if (level.intermissiontime)
985  {
986  // FIXME: add view drifting here?
987  current_client->ps.blend[3] = 0;
988  current_client->ps.fov = 90;
989  G_SetStats (ent);
990  return;
991  }
992 
994 
995  // burn from lava, etc
996  P_WorldEffects ();
997 
998  //
999  // set model angles from view angles so other things in
1000  // the world can tell which direction you are looking
1001  //
1002  if (ent->client->v_angle[PITCH] > 180)
1003  ent->s.angles[PITCH] = (-360 + ent->client->v_angle[PITCH])/3;
1004  else
1005  ent->s.angles[PITCH] = ent->client->v_angle[PITCH]/3;
1006  ent->s.angles[YAW] = ent->client->v_angle[YAW];
1007  ent->s.angles[ROLL] = 0;
1008  ent->s.angles[ROLL] = SV_CalcRoll (ent->s.angles, ent->velocity)*4;
1009 
1010  //
1011  // calculate speed and cycle to be used for
1012  // all cyclic walking effects
1013  //
1014  xyspeed = sqrt(ent->velocity[0]*ent->velocity[0] + ent->velocity[1]*ent->velocity[1]);
1015 
1016  if (xyspeed < 5)
1017  {
1018  bobmove = 0;
1019  current_client->bobtime = 0; // start at beginning of cycle again
1020  }
1021  else if (ent->groundentity)
1022  { // so bobbing only cycles when on ground
1023  if (xyspeed > 210)
1024  bobmove = 0.25;
1025  else if (xyspeed > 100)
1026  bobmove = 0.125;
1027  else
1028  bobmove = 0.0625;
1029  }
1030 
1031  bobtime = (current_client->bobtime += bobmove);
1032 
1034  bobtime *= 4;
1035 
1036  bobcycle = (int)bobtime;
1037  bobfracsin = fabs(sin(bobtime*M_PI));
1038 
1039  // detect hitting the floor
1040  P_FallingDamage (ent);
1041 
1042  // apply all the damage taken this frame
1043  P_DamageFeedback (ent);
1044 
1045  // determine the view offsets
1046  SV_CalcViewOffset (ent);
1047 
1048  // determine the gun offsets
1049  SV_CalcGunOffset (ent);
1050 
1051  // determine the full screen color blend
1052  // must be after viewoffset, so eye contents can be
1053  // accurately determined
1054  // FIXME: with client prediction, the contents
1055  // should be determined by the client
1056  SV_CalcBlend (ent);
1057 
1058  // chase cam stuff
1059  if (ent->client->resp.spectator)
1060  G_SetSpectatorStats(ent);
1061  else
1062  G_SetStats (ent);
1063  G_CheckChaseStats(ent);
1064 
1065  G_SetClientEvent (ent);
1066 
1067  G_SetClientEffects (ent);
1068 
1069  G_SetClientSound (ent);
1070 
1071  G_SetClientFrame (ent);
1072 
1073  VectorCopy (ent->velocity, ent->client->oldvelocity);
1075 
1076  // clear weapon kicks
1077  VectorClear (ent->client->kick_origin);
1078  VectorClear (ent->client->kick_angles);
1079 
1080  // if the scoreboard is up, update it
1081  if (ent->client->showscores && !(level.framenum & 31) )
1082  {
1083  DeathmatchScoreboardMessage (ent, ent->enemy);
1084  gi.unicast (ent, false);
1085  }
1086 }

Referenced by ClientBegin(), ClientBeginDeathmatch(), and ClientEndServerFrames().

◆ G_SetClientEffects()

void G_SetClientEffects ( edict_t ent)

Definition at line 745 of file p_view.c.

746 {
747  int pa_type;
748  int remaining;
749 
750  ent->s.effects = 0;
751  ent->s.renderfx = 0;
752 
753  if (ent->health <= 0 || level.intermissiontime)
754  return;
755 
756  if (ent->powerarmor_time > level.time)
757  {
758  pa_type = PowerArmorType (ent);
759  if (pa_type == POWER_ARMOR_SCREEN)
760  {
761  ent->s.effects |= EF_POWERSCREEN;
762  }
763  else if (pa_type == POWER_ARMOR_SHIELD)
764  {
765  ent->s.effects |= EF_COLOR_SHELL;
766  ent->s.renderfx |= RF_SHELL_GREEN;
767  }
768  }
769 
770  if (ent->client->quad_framenum > level.framenum)
771  {
772  remaining = ent->client->quad_framenum - level.framenum;
773  if (remaining > 30 || (remaining & 4) )
774  ent->s.effects |= EF_QUAD;
775  }
776 
777  if (ent->client->invincible_framenum > level.framenum)
778  {
779  remaining = ent->client->invincible_framenum - level.framenum;
780  if (remaining > 30 || (remaining & 4) )
781  ent->s.effects |= EF_PENT;
782  }
783 
784  // show cheaters!!!
785  if (ent->flags & FL_GODMODE)
786  {
787  ent->s.effects |= EF_COLOR_SHELL;
789  }
790 }

Referenced by ClientEndServerFrame().

◆ G_SetClientEvent()

void G_SetClientEvent ( edict_t ent)

Definition at line 798 of file p_view.c.

799 {
800  if (ent->s.event)
801  return;
802 
803  if ( ent->groundentity && xyspeed > 225)
804  {
805  if ( (int)(current_client->bobtime+bobmove) != bobcycle )
806  ent->s.event = EV_FOOTSTEP;
807  }
808 }

Referenced by ClientEndServerFrame().

◆ G_SetClientFrame()

void G_SetClientFrame ( edict_t ent)

Definition at line 855 of file p_view.c.

856 {
857  gclient_t *client;
858  qboolean duck, run;
859 
860  if (ent->s.modelindex != 255)
861  return; // not in the player model
862 
863  client = ent->client;
864 
865  if (client->ps.pmove.pm_flags & PMF_DUCKED)
866  duck = true;
867  else
868  duck = false;
869  if (xyspeed)
870  run = true;
871  else
872  run = false;
873 
874  // check for stand/duck and stop/go transitions
875  if (duck != client->anim_duck && client->anim_priority < ANIM_DEATH)
876  goto newanim;
877  if (run != client->anim_run && client->anim_priority == ANIM_BASIC)
878  goto newanim;
879  if (!ent->groundentity && client->anim_priority <= ANIM_WAVE)
880  goto newanim;
881 
882  if(client->anim_priority == ANIM_REVERSE)
883  {
884  if(ent->s.frame > client->anim_end)
885  {
886  ent->s.frame--;
887  return;
888  }
889  }
890  else if (ent->s.frame < client->anim_end)
891  { // continue an animation
892  ent->s.frame++;
893  return;
894  }
895 
896  if (client->anim_priority == ANIM_DEATH)
897  return; // stay there
898  if (client->anim_priority == ANIM_JUMP)
899  {
900  if (!ent->groundentity)
901  return; // stay there
903  ent->s.frame = FRAME_jump3;
904  ent->client->anim_end = FRAME_jump6;
905  return;
906  }
907 
908 newanim:
909  // return to either a running or standing frame
910  client->anim_priority = ANIM_BASIC;
911  client->anim_duck = duck;
912  client->anim_run = run;
913 
914  if (!ent->groundentity)
915  {
916  client->anim_priority = ANIM_JUMP;
917  if (ent->s.frame != FRAME_jump2)
918  ent->s.frame = FRAME_jump1;
919  client->anim_end = FRAME_jump2;
920  }
921  else if (run)
922  { // running
923  if (duck)
924  {
925  ent->s.frame = FRAME_crwalk1;
926  client->anim_end = FRAME_crwalk6;
927  }
928  else
929  {
930  ent->s.frame = FRAME_run1;
931  client->anim_end = FRAME_run6;
932  }
933  }
934  else
935  { // standing
936  if (duck)
937  {
938  ent->s.frame = FRAME_crstnd01;
939  client->anim_end = FRAME_crstnd19;
940  }
941  else
942  {
943  ent->s.frame = FRAME_stand01;
944  client->anim_end = FRAME_stand40;
945  }
946  }
947 }

Referenced by ClientEndServerFrame().

◆ G_SetClientSound()

void G_SetClientSound ( edict_t ent)

Definition at line 815 of file p_view.c.

816 {
817  char *weap;
818 
820  {
822  ent->client->pers.helpchanged = 1;
823  }
824 
825  // help beep (no more than three times)
826  if (ent->client->pers.helpchanged && ent->client->pers.helpchanged <= 3 && !(level.framenum&63) )
827  {
828  ent->client->pers.helpchanged++;
829  gi.sound (ent, CHAN_VOICE, gi.soundindex ("misc/pc_up.wav"), 1, ATTN_STATIC, 0);
830  }
831 
832 
833  if (ent->client->pers.weapon)
834  weap = ent->client->pers.weapon->classname;
835  else
836  weap = "";
837 
838  if (ent->waterlevel && (ent->watertype&(CONTENTS_LAVA|CONTENTS_SLIME)) )
839  ent->s.sound = snd_fry;
840  else if (strcmp(weap, "weapon_railgun") == 0)
841  ent->s.sound = gi.soundindex("weapons/rg_hum.wav");
842  else if (strcmp(weap, "weapon_bfg") == 0)
843  ent->s.sound = gi.soundindex("weapons/bfg_hum.wav");
844  else if (ent->client->weapon_sound)
845  ent->s.sound = ent->client->weapon_sound;
846  else
847  ent->s.sound = 0;
848 }

Referenced by ClientEndServerFrame().

◆ P_DamageFeedback()

void P_DamageFeedback ( edict_t player)

Definition at line 71 of file p_view.c.

72 {
73  gclient_t *client;
74  float side;
75  float realcount, count, kick;
76  vec3_t v;
77  int r, l;
78  static vec3_t power_color = {0.0, 1.0, 0.0};
79  static vec3_t acolor = {1.0, 1.0, 1.0};
80  static vec3_t bcolor = {1.0, 0.0, 0.0};
81 
82  client = player->client;
83 
84  // flash the backgrounds behind the status numbers
85  client->ps.stats[STAT_FLASHES] = 0;
86  if (client->damage_blood)
87  client->ps.stats[STAT_FLASHES] |= 1;
88  if (client->damage_armor && !(player->flags & FL_GODMODE) && (client->invincible_framenum <= level.framenum))
89  client->ps.stats[STAT_FLASHES] |= 2;
90 
91  // total points of damage shot at the player this frame
92  count = (client->damage_blood + client->damage_armor + client->damage_parmor);
93  if (count == 0)
94  return; // didn't take any damage
95 
96  // start a pain animation if still in the player model
97  if (client->anim_priority < ANIM_PAIN && player->s.modelindex == 255)
98  {
99  static int i;
100 
101  client->anim_priority = ANIM_PAIN;
102  if (client->ps.pmove.pm_flags & PMF_DUCKED)
103  {
104  player->s.frame = FRAME_crpain1-1;
105  client->anim_end = FRAME_crpain4;
106  }
107  else
108  {
109  i = (i+1)%3;
110  switch (i)
111  {
112  case 0:
113  player->s.frame = FRAME_pain101-1;
114  client->anim_end = FRAME_pain104;
115  break;
116  case 1:
117  player->s.frame = FRAME_pain201-1;
118  client->anim_end = FRAME_pain204;
119  break;
120  case 2:
121  player->s.frame = FRAME_pain301-1;
122  client->anim_end = FRAME_pain304;
123  break;
124  }
125  }
126  }
127 
128  realcount = count;
129  if (count < 10)
130  count = 10; // always make a visible effect
131 
132  // play an apropriate pain sound
133  if ((level.time > player->pain_debounce_time) && !(player->flags & FL_GODMODE) && (client->invincible_framenum <= level.framenum))
134  {
135  r = 1 + (rand()&1);
136  player->pain_debounce_time = level.time + 0.7;
137  if (player->health < 25)
138  l = 25;
139  else if (player->health < 50)
140  l = 50;
141  else if (player->health < 75)
142  l = 75;
143  else
144  l = 100;
145  gi.sound (player, CHAN_VOICE, gi.soundindex(va("*pain%i_%i.wav", l, r)), 1, ATTN_NORM, 0);
146  }
147 
148  // the total alpha of the blend is always proportional to count
149  if (client->damage_alpha < 0)
150  client->damage_alpha = 0;
151  client->damage_alpha += count*0.01;
152  if (client->damage_alpha < 0.2)
153  client->damage_alpha = 0.2;
154  if (client->damage_alpha > 0.6)
155  client->damage_alpha = 0.6; // don't go too saturated
156 
157  // the color of the blend will vary based on how much was absorbed
158  // by different armors
159  VectorClear (v);
160  if (client->damage_parmor)
161  VectorMA (v, (float)client->damage_parmor/realcount, power_color, v);
162  if (client->damage_armor)
163  VectorMA (v, (float)client->damage_armor/realcount, acolor, v);
164  if (client->damage_blood)
165  VectorMA (v, (float)client->damage_blood/realcount, bcolor, v);
166  VectorCopy (v, client->damage_blend);
167 
168 
169  //
170  // calculate view angle kicks
171  //
172  kick = abs(client->damage_knockback);
173  if (kick && player->health > 0) // kick of 0 means no view adjust at all
174  {
175  kick = kick * 100 / player->health;
176 
177  if (kick < count*0.5)
178  kick = count*0.5;
179  if (kick > 50)
180  kick = 50;
181 
182  VectorSubtract (client->damage_from, player->s.origin, v);
183  VectorNormalize (v);
184 
185  side = DotProduct (v, right);
186  client->v_dmg_roll = kick*side*0.3;
187 
188  side = -DotProduct (v, forward);
189  client->v_dmg_pitch = kick*side*0.3;
190 
191  client->v_dmg_time = level.time + DAMAGE_TIME;
192  }
193 
194  //
195  // clear totals
196  //
197  client->damage_blood = 0;
198  client->damage_armor = 0;
199  client->damage_parmor = 0;
200  client->damage_knockback = 0;
201 }

Referenced by ClientEndServerFrame().

◆ P_FallingDamage()

void P_FallingDamage ( edict_t ent)

Definition at line 501 of file p_view.c.

502 {
503  float delta;
504  int damage;
505  vec3_t dir;
506 
507  if (ent->s.modelindex != 255)
508  return; // not in the player model
509 
510  if (ent->movetype == MOVETYPE_NOCLIP)
511  return;
512 
513  if ((ent->client->oldvelocity[2] < 0) && (ent->velocity[2] > ent->client->oldvelocity[2]) && (!ent->groundentity))
514  {
515  delta = ent->client->oldvelocity[2];
516  }
517  else
518  {
519  if (!ent->groundentity)
520  return;
521  delta = ent->velocity[2] - ent->client->oldvelocity[2];
522  }
523  delta = delta*delta * 0.0001;
524 
525  // never take falling damage if completely underwater
526  if (ent->waterlevel == 3)
527  return;
528  if (ent->waterlevel == 2)
529  delta *= 0.25;
530  if (ent->waterlevel == 1)
531  delta *= 0.5;
532 
533  if (delta < 1)
534  return;
535 
536  if (delta < 15)
537  {
538  ent->s.event = EV_FOOTSTEP;
539  return;
540  }
541 
542  ent->client->fall_value = delta*0.5;
543  if (ent->client->fall_value > 40)
544  ent->client->fall_value = 40;
545  ent->client->fall_time = level.time + FALL_TIME;
546 
547  if (delta > 30)
548  {
549  if (ent->health > 0)
550  {
551  if (delta >= 55)
552  ent->s.event = EV_FALLFAR;
553  else
554  ent->s.event = EV_FALL;
555  }
556  ent->pain_debounce_time = level.time; // no normal pain sound
557  damage = (delta-30)/2;
558  if (damage < 1)
559  damage = 1;
560  VectorSet (dir, 0, 0, 1);
561 
562  if (!deathmatch->value || !((int)dmflags->value & DF_NO_FALLING) )
563  T_Damage (ent, world, world, dir, ent->s.origin, vec3_origin, damage, 0, 0, MOD_FALLING);
564  }
565  else
566  {
567  ent->s.event = EV_FALLSHORT;
568  return;
569  }
570 }

Referenced by ClientEndServerFrame().

◆ P_WorldEffects()

void P_WorldEffects ( void  )

Definition at line 579 of file p_view.c.

580 {
581  qboolean breather;
582  qboolean envirosuit;
583  int waterlevel, old_waterlevel;
584 
586  {
587  current_player->air_finished = level.time + 12; // don't need air
588  return;
589  }
590 
591  waterlevel = current_player->waterlevel;
592  old_waterlevel = current_client->old_waterlevel;
593  current_client->old_waterlevel = waterlevel;
594 
595  breather = current_client->breather_framenum > level.framenum;
596  envirosuit = current_client->enviro_framenum > level.framenum;
597 
598  //
599  // if just entered a water volume, play a sound
600  //
601  if (!old_waterlevel && waterlevel)
602  {
605  gi.sound (current_player, CHAN_BODY, gi.soundindex("player/lava_in.wav"), 1, ATTN_NORM, 0);
607  gi.sound (current_player, CHAN_BODY, gi.soundindex("player/watr_in.wav"), 1, ATTN_NORM, 0);
609  gi.sound (current_player, CHAN_BODY, gi.soundindex("player/watr_in.wav"), 1, ATTN_NORM, 0);
611 
612  // clear damage_debounce, so the pain sound will play immediately
614  }
615 
616  //
617  // if just completely exited a water volume, play a sound
618  //
619  if (old_waterlevel && ! waterlevel)
620  {
622  gi.sound (current_player, CHAN_BODY, gi.soundindex("player/watr_out.wav"), 1, ATTN_NORM, 0);
624  }
625 
626  //
627  // check for head just going under water
628  //
629  if (old_waterlevel != 3 && waterlevel == 3)
630  {
631  gi.sound (current_player, CHAN_BODY, gi.soundindex("player/watr_un.wav"), 1, ATTN_NORM, 0);
632  }
633 
634  //
635  // check for head just coming out of water
636  //
637  if (old_waterlevel == 3 && waterlevel != 3)
638  {
639  if (current_player->air_finished < level.time)
640  { // gasp for air
641  gi.sound (current_player, CHAN_VOICE, gi.soundindex("player/gasp1.wav"), 1, ATTN_NORM, 0);
643  }
644  else if (current_player->air_finished < level.time + 11)
645  { // just break surface
646  gi.sound (current_player, CHAN_VOICE, gi.soundindex("player/gasp2.wav"), 1, ATTN_NORM, 0);
647  }
648  }
649 
650  //
651  // check for drowning
652  //
653  if (waterlevel == 3)
654  {
655  // breather or envirosuit give air
656  if (breather || envirosuit)
657  {
658  current_player->air_finished = level.time + 10;
659 
660  if (((int)(current_client->breather_framenum - level.framenum) % 25) == 0)
661  {
663  gi.sound (current_player, CHAN_AUTO, gi.soundindex("player/u_breath1.wav"), 1, ATTN_NORM, 0);
664  else
665  gi.sound (current_player, CHAN_AUTO, gi.soundindex("player/u_breath2.wav"), 1, ATTN_NORM, 0);
668  //FIXME: release a bubble?
669  }
670  }
671 
672  // if out of air, start drowning
673  if (current_player->air_finished < level.time)
674  { // drown!
676  && current_player->health > 0)
677  {
679 
680  // take more damage the longer underwater
681  current_player->dmg += 2;
682  if (current_player->dmg > 15)
683  current_player->dmg = 15;
684 
685  // play a gurp sound instead of a normal pain sound
687  gi.sound (current_player, CHAN_VOICE, gi.soundindex("player/drown1.wav"), 1, ATTN_NORM, 0);
688  else if (rand()&1)
689  gi.sound (current_player, CHAN_VOICE, gi.soundindex("*gurp1.wav"), 1, ATTN_NORM, 0);
690  else
691  gi.sound (current_player, CHAN_VOICE, gi.soundindex("*gurp2.wav"), 1, ATTN_NORM, 0);
692 
694 
696  }
697  }
698  }
699  else
700  {
701  current_player->air_finished = level.time + 12;
702  current_player->dmg = 2;
703  }
704 
705  //
706  // check for sizzle damage
707  //
708  if (waterlevel && (current_player->watertype&(CONTENTS_LAVA|CONTENTS_SLIME)) )
709  {
711  {
712  if (current_player->health > 0
715  {
716  if (rand()&1)
717  gi.sound (current_player, CHAN_VOICE, gi.soundindex("player/burn1.wav"), 1, ATTN_NORM, 0);
718  else
719  gi.sound (current_player, CHAN_VOICE, gi.soundindex("player/burn2.wav"), 1, ATTN_NORM, 0);
721  }
722 
723  if (envirosuit) // take 1/3 damage with envirosuit
725  else
727  }
728 
730  {
731  if (!envirosuit)
732  { // no damage from slime with envirosuit
734  }
735  }
736  }
737 }

Referenced by ClientEndServerFrame().

◆ SV_AddBlend()

void SV_AddBlend ( float  r,
float  g,
float  b,
float  a,
float *  v_blend 
)

Definition at line 397 of file p_view.c.

398 {
399  float a2, a3;
400 
401  if (a <= 0)
402  return;
403  a2 = v_blend[3] + (1-v_blend[3])*a; // new total alpha
404  a3 = v_blend[3]/a2; // fraction of color from old
405 
406  v_blend[0] = v_blend[0]*a3 + r*(1-a3);
407  v_blend[1] = v_blend[1]*a3 + g*(1-a3);
408  v_blend[2] = v_blend[2]*a3 + b*(1-a3);
409  v_blend[3] = a2;
410 }

Referenced by SV_CalcBlend().

◆ SV_CalcBlend()

void SV_CalcBlend ( edict_t ent)

Definition at line 418 of file p_view.c.

419 {
420  int contents;
421  vec3_t vieworg;
422  int remaining;
423 
424  ent->client->ps.blend[0] = ent->client->ps.blend[1] =
425  ent->client->ps.blend[2] = ent->client->ps.blend[3] = 0;
426 
427  // add for contents
428  VectorAdd (ent->s.origin, ent->client->ps.viewoffset, vieworg);
429  contents = gi.pointcontents (vieworg);
430  if (contents & (CONTENTS_LAVA|CONTENTS_SLIME|CONTENTS_WATER) )
431  ent->client->ps.rdflags |= RDF_UNDERWATER;
432  else
433  ent->client->ps.rdflags &= ~RDF_UNDERWATER;
434 
435  if (contents & (CONTENTS_SOLID|CONTENTS_LAVA))
436  SV_AddBlend (1.0, 0.3, 0.0, 0.6, ent->client->ps.blend);
437  else if (contents & CONTENTS_SLIME)
438  SV_AddBlend (0.0, 0.1, 0.05, 0.6, ent->client->ps.blend);
439  else if (contents & CONTENTS_WATER)
440  SV_AddBlend (0.5, 0.3, 0.2, 0.4, ent->client->ps.blend);
441 
442  // add for powerups
443  if (ent->client->quad_framenum > level.framenum)
444  {
445  remaining = ent->client->quad_framenum - level.framenum;
446  if (remaining == 30) // beginning to fade
447  gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage2.wav"), 1, ATTN_NORM, 0);
448  if (remaining > 30 || (remaining & 4) )
449  SV_AddBlend (0, 0, 1, 0.08, ent->client->ps.blend);
450  }
451  else if (ent->client->invincible_framenum > level.framenum)
452  {
453  remaining = ent->client->invincible_framenum - level.framenum;
454  if (remaining == 30) // beginning to fade
455  gi.sound(ent, CHAN_ITEM, gi.soundindex("items/protect2.wav"), 1, ATTN_NORM, 0);
456  if (remaining > 30 || (remaining & 4) )
457  SV_AddBlend (1, 1, 0, 0.08, ent->client->ps.blend);
458  }
459  else if (ent->client->enviro_framenum > level.framenum)
460  {
461  remaining = ent->client->enviro_framenum - level.framenum;
462  if (remaining == 30) // beginning to fade
463  gi.sound(ent, CHAN_ITEM, gi.soundindex("items/airout.wav"), 1, ATTN_NORM, 0);
464  if (remaining > 30 || (remaining & 4) )
465  SV_AddBlend (0, 1, 0, 0.08, ent->client->ps.blend);
466  }
467  else if (ent->client->breather_framenum > level.framenum)
468  {
469  remaining = ent->client->breather_framenum - level.framenum;
470  if (remaining == 30) // beginning to fade
471  gi.sound(ent, CHAN_ITEM, gi.soundindex("items/airout.wav"), 1, ATTN_NORM, 0);
472  if (remaining > 30 || (remaining & 4) )
473  SV_AddBlend (0.4, 1, 0.4, 0.04, ent->client->ps.blend);
474  }
475 
476  // add for damage
477  if (ent->client->damage_alpha > 0)
479  ,ent->client->damage_blend[2], ent->client->damage_alpha, ent->client->ps.blend);
480 
481  if (ent->client->bonus_alpha > 0)
482  SV_AddBlend (0.85, 0.7, 0.3, ent->client->bonus_alpha, ent->client->ps.blend);
483 
484  // drop the damage value
485  ent->client->damage_alpha -= 0.06;
486  if (ent->client->damage_alpha < 0)
487  ent->client->damage_alpha = 0;
488 
489  // drop the bonus value
490  ent->client->bonus_alpha -= 0.1;
491  if (ent->client->bonus_alpha < 0)
492  ent->client->bonus_alpha = 0;
493 }

Referenced by ClientEndServerFrame().

◆ SV_CalcGunOffset()

void SV_CalcGunOffset ( edict_t ent)

Definition at line 345 of file p_view.c.

346 {
347  int i;
348  float delta;
349 
350  // gun angles from bobbing
351  ent->client->ps.gunangles[ROLL] = xyspeed * bobfracsin * 0.005;
352  ent->client->ps.gunangles[YAW] = xyspeed * bobfracsin * 0.01;
353  if (bobcycle & 1)
354  {
355  ent->client->ps.gunangles[ROLL] = -ent->client->ps.gunangles[ROLL];
356  ent->client->ps.gunangles[YAW] = -ent->client->ps.gunangles[YAW];
357  }
358 
359  ent->client->ps.gunangles[PITCH] = xyspeed * bobfracsin * 0.005;
360 
361  // gun angles from delta movement
362  for (i=0 ; i<3 ; i++)
363  {
364  delta = ent->client->oldviewangles[i] - ent->client->ps.viewangles[i];
365  if (delta > 180)
366  delta -= 360;
367  if (delta < -180)
368  delta += 360;
369  if (delta > 45)
370  delta = 45;
371  if (delta < -45)
372  delta = -45;
373  if (i == YAW)
374  ent->client->ps.gunangles[ROLL] += 0.1*delta;
375  ent->client->ps.gunangles[i] += 0.2 * delta;
376  }
377 
378  // gun height
379  VectorClear (ent->client->ps.gunoffset);
380 // ent->ps->gunorigin[2] += bob;
381 
382  // gun_x / gun_y / gun_z are development tools
383  for (i=0 ; i<3 ; i++)
384  {
385  ent->client->ps.gunoffset[i] += forward[i]*(gun_y->value);
386  ent->client->ps.gunoffset[i] += right[i]*gun_x->value;
387  ent->client->ps.gunoffset[i] += up[i]* (-gun_z->value);
388  }
389 }

Referenced by ClientEndServerFrame().

◆ SV_CalcRoll()

float SV_CalcRoll ( vec3_t  angles,
vec3_t  velocity 
)

Definition at line 42 of file p_view.c.

43 {
44  float sign;
45  float side;
46  float value;
47 
48  side = DotProduct (velocity, right);
49  sign = side < 0 ? -1 : 1;
50  side = fabs(side);
51 
53 
54  if (side < sv_rollspeed->value)
55  side = side * value / sv_rollspeed->value;
56  else
57  side = value;
58 
59  return side*sign;
60 
61 }

Referenced by ClientEndServerFrame().

◆ SV_CalcViewOffset()

void SV_CalcViewOffset ( edict_t ent)

Definition at line 222 of file p_view.c.

223 {
224  float *angles;
225  float bob;
226  float ratio;
227  float delta;
228  vec3_t v;
229 
230 
231 //===================================
232 
233  // base angles
234  angles = ent->client->ps.kick_angles;
235 
236  // if dead, fix the angle and don't add any kick
237  if (ent->deadflag)
238  {
239  VectorClear (angles);
240 
241  ent->client->ps.viewangles[ROLL] = 40;
242  ent->client->ps.viewangles[PITCH] = -15;
243  ent->client->ps.viewangles[YAW] = ent->client->killer_yaw;
244  }
245  else
246  {
247  // add angles based on weapon kick
248 
249  VectorCopy (ent->client->kick_angles, angles);
250 
251  // add angles based on damage kick
252 
253  ratio = (ent->client->v_dmg_time - level.time) / DAMAGE_TIME;
254  if (ratio < 0)
255  {
256  ratio = 0;
257  ent->client->v_dmg_pitch = 0;
258  ent->client->v_dmg_roll = 0;
259  }
260  angles[PITCH] += ratio * ent->client->v_dmg_pitch;
261  angles[ROLL] += ratio * ent->client->v_dmg_roll;
262 
263  // add pitch based on fall kick
264 
265  ratio = (ent->client->fall_time - level.time) / FALL_TIME;
266  if (ratio < 0)
267  ratio = 0;
268  angles[PITCH] += ratio * ent->client->fall_value;
269 
270  // add angles based on velocity
271 
272  delta = DotProduct (ent->velocity, forward);
273  angles[PITCH] += delta*run_pitch->value;
274 
275  delta = DotProduct (ent->velocity, right);
276  angles[ROLL] += delta*run_roll->value;
277 
278  // add angles based on bob
279 
280  delta = bobfracsin * bob_pitch->value * xyspeed;
281  if (ent->client->ps.pmove.pm_flags & PMF_DUCKED)
282  delta *= 6; // crouching
283  angles[PITCH] += delta;
284  delta = bobfracsin * bob_roll->value * xyspeed;
285  if (ent->client->ps.pmove.pm_flags & PMF_DUCKED)
286  delta *= 6; // crouching
287  if (bobcycle & 1)
288  delta = -delta;
289  angles[ROLL] += delta;
290  }
291 
292 //===================================
293 
294  // base origin
295 
296  VectorClear (v);
297 
298  // add view height
299 
300  v[2] += ent->viewheight;
301 
302  // add fall height
303 
304  ratio = (ent->client->fall_time - level.time) / FALL_TIME;
305  if (ratio < 0)
306  ratio = 0;
307  v[2] -= ratio * ent->client->fall_value * 0.4;
308 
309  // add bob height
310 
311  bob = bobfracsin * xyspeed * bob_up->value;
312  if (bob > 6)
313  bob = 6;
314  //gi.DebugGraph (bob *2, 255);
315  v[2] += bob;
316 
317  // add kick offset
318 
319  VectorAdd (v, ent->client->kick_origin, v);
320 
321  // absolutely bound offsets
322  // so the view can never be outside the player box
323 
324  if (v[0] < -14)
325  v[0] = -14;
326  else if (v[0] > 14)
327  v[0] = 14;
328  if (v[1] < -14)
329  v[1] = -14;
330  else if (v[1] > 14)
331  v[1] = 14;
332  if (v[2] < -22)
333  v[2] = -22;
334  else if (v[2] > 30)
335  v[2] = 30;
336 
337  VectorCopy (v, ent->client->ps.viewoffset);
338 }

Referenced by ClientEndServerFrame().

Variable Documentation

◆ bobcycle

int bobcycle

◆ bobfracsin

float bobfracsin

Definition at line 34 of file p_view.c.

Referenced by ClientEndServerFrame(), SV_CalcGunOffset(), and SV_CalcViewOffset().

◆ bobmove

float bobmove

Definition at line 32 of file p_view.c.

Referenced by ClientEndServerFrame(), and G_SetClientEvent().

◆ current_client

gclient_t* current_client
static

Definition at line 27 of file p_view.c.

Referenced by ClientEndServerFrame(), G_SetClientEvent(), and P_WorldEffects().

◆ current_player

edict_t* current_player
static

Definition at line 26 of file p_view.c.

Referenced by ClientEndServerFrame(), and P_WorldEffects().

◆ forward

◆ right

vec3_t right
static

◆ up

◆ xyspeed

float xyspeed
gi
game_import_t gi
Definition: g_main.c:25
STAT_FLASHES
#define STAT_FLASHES
Definition: q_shared.h:1016
edict_s::s
entity_state_t s
Definition: g_local.h:970
gclient_s::damage_from
vec3_t damage_from
Definition: g_local.h:915
G_SetSpectatorStats
void G_SetSpectatorStats(edict_t *ent)
Definition: p_hud.c:550
edict_s::groundentity
edict_t * groundentity
Definition: g_local.h:1079
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
gclient_s::v_dmg_roll
float v_dmg_roll
Definition: g_local.h:922
RF_SHELL_RED
#define RF_SHELL_RED
Definition: q_shared.h:609
FRAME_jump6
#define FRAME_jump6
Definition: m_player.h:95
value
GLfloat value
Definition: qgl_win.c:63
gclient_s::oldviewangles
vec3_t oldviewangles
Definition: g_local.h:929
YAW
#define YAW
Definition: q_shared.h:73
run_roll
cvar_t * run_roll
Definition: g_main.c:62
gclient_s::v_angle
vec3_t v_angle
Definition: g_local.h:927
FRAME_pain301
#define FRAME_pain301
Definition: m_actor.h:104
EV_FALL
@ EV_FALL
Definition: q_shared.h:1135
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
gclient_s::v_dmg_time
float v_dmg_time
Definition: g_local.h:922
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:163
CHAN_ITEM
#define CHAN_ITEM
Definition: q_shared.h:986
sv_rollspeed
cvar_t * sv_rollspeed
Definition: g_main.c:55
DF_NO_FALLING
#define DF_NO_FALLING
Definition: q_shared.h:1027
FRAME_crpain1
#define FRAME_crpain1
Definition: m_player.h:193
gclient_s::kick_origin
vec3_t kick_origin
Definition: g_local.h:921
entity_state_s::frame
int frame
Definition: q_shared.h:1154
ANIM_DEATH
#define ANIM_DEATH
Definition: g_local.h:828
CONTENTS_WATER
#define CONTENTS_WATER
Definition: qfiles.h:338
run_pitch
cvar_t * run_pitch
Definition: g_main.c:61
gclient_s::next_drown_time
float next_drown_time
Definition: g_local.h:932
RF_SHELL_GREEN
#define RF_SHELL_GREEN
Definition: q_shared.h:610
FRAME_run6
#define FRAME_run6
Definition: m_berserk.h:65
client_persistant_t::helpchanged
int helpchanged
Definition: g_local.h:865
gclient_s::anim_end
int anim_end
Definition: g_local.h:939
snd_fry
int snd_fry
Definition: g_main.c:30
EF_QUAD
#define EF_QUAD
Definition: q_shared.h:576
entity_state_s::renderfx
int renderfx
Definition: q_shared.h:1157
player_state_t::gunangles
vec3_t gunangles
Definition: q_shared.h:1185
v
GLdouble v
Definition: qgl_win.c:143
bobfracsin
float bobfracsin
Definition: p_view.c:34
FRAME_stand01
#define FRAME_stand01
Definition: m_boss31.h:136
PowerArmorType
int PowerArmorType(edict_t *ent)
Definition: g_items.c:688
MOVETYPE_NOCLIP
@ MOVETYPE_NOCLIP
Definition: g_local.h:191
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1149
FRAME_jump2
#define FRAME_jump2
Definition: m_player.h:91
game_locals_t::helpchanged
int helpchanged
Definition: g_local.h:276
player_state_t::gunoffset
vec3_t gunoffset
Definition: q_shared.h:1186
G_SetClientSound
void G_SetClientSound(edict_t *ent)
Definition: p_view.c:815
edict_s::air_finished
float air_finished
Definition: g_local.h:1033
gun_x
cvar_t * gun_x
Definition: g_main.c:57
FRAME_pain304
#define FRAME_pain304
Definition: m_boss31.h:114
MOD_FALLING
#define MOD_FALLING
Definition: g_local.h:491
gclient_s::fall_time
float fall_time
Definition: g_local.h:923
qboolean
qboolean
Definition: q_shared.h:63
FRAME_jump3
#define FRAME_jump3
Definition: m_player.h:92
EV_FOOTSTEP
@ EV_FOOTSTEP
Definition: q_shared.h:1133
gclient_s::damage_blend
vec3_t damage_blend
Definition: g_local.h:926
VectorClear
#define VectorClear(a)
Definition: q_shared.h:166
i
int i
Definition: q_shared.c:305
edict_s::client
struct gclient_s * client
Definition: g_local.h:971
entity_state_s::event
int event
Definition: q_shared.h:1162
gclient_s::kick_angles
vec3_t kick_angles
Definition: g_local.h:920
game_import_t::sound
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
Definition: game.h:109
PITCH
#define PITCH
Definition: q_shared.h:72
client_respawn_t::spectator
qboolean spectator
Definition: g_local.h:878
ATTN_STATIC
#define ATTN_STATIC
Definition: q_shared.h:997
v_blend
float v_blend[4]
Definition: gl_rmain.c:57
CONTENTS_SOLID
#define CONTENTS_SOLID
Definition: qfiles.h:333
gun_y
cvar_t * gun_y
Definition: g_local.h:536
pmove_state_t::velocity
short velocity[3]
Definition: q_shared.h:499
player_state_t::fov
float fov
Definition: q_shared.h:1192
MOD_SLIME
#define MOD_SLIME
Definition: g_local.h:487
EF_PENT
#define EF_PENT
Definition: q_shared.h:577
M_PI
#define M_PI
Definition: q_shared.h:142
gclient_s::bobtime
float bobtime
Definition: g_local.h:928
gclient_s::oldvelocity
vec3_t oldvelocity
Definition: g_local.h:930
player_state_t::rdflags
int rdflags
Definition: q_shared.h:1194
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:995
T_Damage
void T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir, vec3_t point, vec3_t normal, int damage, int knockback, int dflags, int mod)
Definition: g_combat.c:377
FRAME_pain101
#define FRAME_pain101
Definition: m_actor.h:98
gclient_s::bonus_alpha
float bonus_alpha
Definition: g_local.h:925
edict_s::movetype
int movetype
Definition: g_local.h:1001
FRAME_crstnd01
#define FRAME_crstnd01
Definition: m_player.h:159
entity_state_s::effects
unsigned int effects
Definition: q_shared.h:1156
FALL_TIME
#define FALL_TIME
Definition: g_local.h:47
entity_state_s::sound
int sound
Definition: q_shared.h:1161
gclient_s::enviro_framenum
float enviro_framenum
Definition: g_local.h:948
EF_COLOR_SHELL
#define EF_COLOR_SHELL
Definition: q_shared.h:569
gclient_s::pers
client_persistant_t pers
Definition: g_local.h:890
va
char * va(char *format,...)
Definition: q_shared.c:1050
ANIM_PAIN
#define ANIM_PAIN
Definition: g_local.h:826
SV_CalcGunOffset
void SV_CalcGunOffset(edict_t *ent)
Definition: p_view.c:345
ANIM_REVERSE
#define ANIM_REVERSE
Definition: g_local.h:829
G_SetStats
void G_SetStats(edict_t *ent)
Definition: p_hud.c:378
CHAN_AUTO
#define CHAN_AUTO
Definition: q_shared.h:983
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
POWER_ARMOR_SHIELD
#define POWER_ARMOR_SHIELD
Definition: g_local.h:161
POWER_ARMOR_SCREEN
#define POWER_ARMOR_SCREEN
Definition: g_local.h:160
ANIM_BASIC
#define ANIM_BASIC
Definition: g_local.h:823
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:985
gclient_s::damage_armor
int damage_armor
Definition: g_local.h:911
FL_INWATER
#define FL_INWATER
Definition: g_local.h:62
G_SetClientEffects
void G_SetClientEffects(edict_t *ent)
Definition: p_view.c:745
DAMAGE_TIME
#define DAMAGE_TIME
Definition: g_local.h:46
xyspeed
float xyspeed
Definition: p_view.c:30
SV_CalcRoll
float SV_CalcRoll(vec3_t angles, vec3_t velocity)
Definition: p_view.c:42
ANIM_JUMP
#define ANIM_JUMP
Definition: g_local.h:825
r
GLdouble GLdouble r
Definition: qgl_win.c:336
client_persistant_t::weapon
gitem_t * weapon
Definition: g_local.h:858
gclient_s::anim_duck
qboolean anim_duck
Definition: g_local.h:941
edict_s::viewheight
int viewheight
Definition: g_local.h:1067
ROLL
#define ROLL
Definition: q_shared.h:74
gun_z
cvar_t * gun_z
Definition: g_local.h:536
FRAME_jump1
#define FRAME_jump1
Definition: m_player.h:90
FRAME_pain204
#define FRAME_pain204
Definition: m_brain.h:136
player_state_t::viewangles
vec3_t viewangles
Definition: q_shared.h:1180
game_import_t::soundindex
int(* soundindex)(char *name)
Definition: game.h:122
forward
static vec3_t forward
Definition: p_view.c:29
gclient_s::damage_knockback
int damage_knockback
Definition: g_local.h:914
player_state_t::pmove
pmove_state_t pmove
Definition: q_shared.h:1176
SV_CalcViewOffset
void SV_CalcViewOffset(edict_t *ent)
Definition: p_view.c:222
game_import_t::pointcontents
int(* pointcontents)(vec3_t point)
Definition: game.h:129
FL_GODMODE
#define FL_GODMODE
Definition: g_local.h:63
player_state_t::kick_angles
vec3_t kick_angles
Definition: q_shared.h:1182
player_state_t::viewoffset
vec3_t viewoffset
Definition: q_shared.h:1181
player_state_t::blend
float blend[4]
Definition: q_shared.h:1190
edict_s::deadflag
int deadflag
Definition: g_local.h:1060
DotProduct
#define DotProduct(x, y)
Definition: q_shared.h:162
gclient_s::killer_yaw
float killer_yaw
Definition: g_local.h:917
cvar_s::value
float value
Definition: q_shared.h:331
game
game_locals_t game
Definition: g_main.c:23
DeathmatchScoreboardMessage
void DeathmatchScoreboardMessage(edict_t *client, edict_t *killer)
Definition: p_hud.c:165
bobcycle
int bobcycle
Definition: p_view.c:33
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
gclient_s::ps
player_state_t ps
Definition: g_local.h:886
edict_s::watertype
int watertype
Definition: g_local.h:1099
G_SetClientEvent
void G_SetClientEvent(edict_t *ent)
Definition: p_view.c:798
edict_s::damage_debounce_time
float damage_debounce_time
Definition: g_local.h:1053
bob_up
cvar_t * bob_up
Definition: g_main.c:63
P_WorldEffects
void P_WorldEffects(void)
Definition: p_view.c:579
edict_s::dmg
int dmg
Definition: g_local.h:1069
FRAME_crwalk1
#define FRAME_crwalk1
Definition: m_player.h:178
edict_s::velocity
vec3_t velocity
Definition: g_local.h:1030
gclient_s::breather_framenum
float breather_framenum
Definition: g_local.h:947
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:164
CONTENTS_SLIME
#define CONTENTS_SLIME
Definition: qfiles.h:337
current_client
static gclient_t * current_client
Definition: p_view.c:27
EF_POWERSCREEN
#define EF_POWERSCREEN
Definition: q_shared.h:570
gclient_s::quad_framenum
float quad_framenum
Definition: g_local.h:945
RDF_UNDERWATER
#define RDF_UNDERWATER
Definition: q_shared.h:621
gclient_s::showscores
qboolean showscores
Definition: g_local.h:894
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:165
edict_s::pain_debounce_time
float pain_debounce_time
Definition: g_local.h:1052
gclient_s::breather_sound
int breather_sound
Definition: g_local.h:934
game_import_t::unicast
void(* unicast)(edict_t *ent, qboolean reliable)
Definition: game.h:145
vec3_origin
vec3_t vec3_origin
Definition: q_shared.c:24
FRAME_stand40
#define FRAME_stand40
Definition: m_boss2.h:34
bob_pitch
cvar_t * bob_pitch
Definition: g_main.c:64
world
#define world
Definition: g_local.h:556
up
static vec3_t up
Definition: p_view.c:29
PNOISE_SELF
#define PNOISE_SELF
Definition: g_local.h:182
bobmove
float bobmove
Definition: p_view.c:32
level
GLint level
Definition: qgl_win.c:116
bob_roll
cvar_t * bob_roll
Definition: g_main.c:65
right
static vec3_t right
Definition: p_view.c:29
edict_s::flags
int flags
Definition: g_local.h:1002
client_persistant_t::game_helpchanged
int game_helpchanged
Definition: g_local.h:864
gclient_s::invincible_framenum
float invincible_framenum
Definition: g_local.h:946
FRAME_run1
#define FRAME_run1
Definition: m_berserk.h:60
sqrt
double sqrt(double x)
FRAME_crpain4
#define FRAME_crpain4
Definition: m_player.h:196
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
CONTENTS_LAVA
#define CONTENTS_LAVA
Definition: qfiles.h:336
gclient_s::old_waterlevel
int old_waterlevel
Definition: g_local.h:933
gclient_s::fall_value
float fall_value
Definition: g_local.h:923
gclient_s::v_dmg_pitch
float v_dmg_pitch
Definition: g_local.h:922
PlayerNoise
void PlayerNoise(edict_t *who, vec3_t where, int type)
Definition: p_weapon.c:58
PMF_DUCKED
#define PMF_DUCKED
Definition: q_shared.h:481
EV_FALLSHORT
@ EV_FALLSHORT
Definition: q_shared.h:1134
entity_state_s::modelindex
int modelindex
Definition: q_shared.h:1152
gclient_s::damage_alpha
float damage_alpha
Definition: g_local.h:924
sv_rollangle
cvar_t * sv_rollangle
Definition: g_main.c:56
EV_FALLFAR
@ EV_FALLFAR
Definition: q_shared.h:1136
FRAME_pain201
#define FRAME_pain201
Definition: m_actor.h:101
gclient_s::damage_parmor
int damage_parmor
Definition: g_local.h:912
pmove_state_t::origin
short origin[3]
Definition: q_shared.h:498
SV_AddBlend
void SV_AddBlend(float r, float g, float b, float a, float *v_blend)
Definition: p_view.c:397
P_DamageFeedback
void P_DamageFeedback(edict_t *player)
Definition: p_view.c:71
RF_SHELL_BLUE
#define RF_SHELL_BLUE
Definition: q_shared.h:611
G_CheckChaseStats
void G_CheckChaseStats(edict_t *ent)
Definition: p_hud.c:531
VectorSet
#define VectorSet(v, x, y, z)
Definition: q_shared.h:168
ANIM_WAVE
#define ANIM_WAVE
Definition: g_local.h:824
dmflags
cvar_t * dmflags
Definition: g_main.c:37
edict_s::waterlevel
int waterlevel
Definition: g_local.h:1100
CHAN_BODY
#define CHAN_BODY
Definition: q_shared.h:987
current_player
static edict_t * current_player
Definition: p_view.c:26
FRAME_pain104
#define FRAME_pain104
Definition: m_brain.h:115
DAMAGE_NO_ARMOR
#define DAMAGE_NO_ARMOR
Definition: g_local.h:664
FRAME_crwalk6
#define FRAME_crwalk6
Definition: m_player.h:183
G_SetClientFrame
void G_SetClientFrame(edict_t *ent)
Definition: p_view.c:855
gclient_s::anim_run
qboolean anim_run
Definition: g_local.h:942
gclient_s
Definition: g_local.h:883
P_FallingDamage
void P_FallingDamage(edict_t *ent)
Definition: p_view.c:501
edict_s::enemy
edict_t * enemy
Definition: g_local.h:1076
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1150
pmove_state_t::pm_flags
byte pm_flags
Definition: q_shared.h:500
gclient_s::weapon_sound
int weapon_sound
Definition: g_local.h:953
gclient_s::anim_priority
int anim_priority
Definition: g_local.h:940
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
MOD_LAVA
#define MOD_LAVA
Definition: g_local.h:488
MOD_WATER
#define MOD_WATER
Definition: g_local.h:486
edict_s::powerarmor_time
float powerarmor_time
Definition: g_local.h:1063
player_state_t::stats
short stats[MAX_STATS]
Definition: q_shared.h:1196
SV_CalcBlend
void SV_CalcBlend(edict_t *ent)
Definition: p_view.c:418
count
GLint GLsizei count
Definition: qgl_win.c:128
gclient_s::resp
client_respawn_t resp
Definition: g_local.h:891
gclient_s::damage_blood
int damage_blood
Definition: g_local.h:913
gitem_s::classname
char * classname
Definition: g_local.h:238
edict_s::health
int health
Definition: g_local.h:1057
FRAME_crstnd19
#define FRAME_crstnd19
Definition: m_player.h:177