mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-02-23 20:41:11 +00:00
updates to g_active.c
This commit is contained in:
parent
801359c672
commit
32cb14dde3
1 changed files with 477 additions and 459 deletions
|
@ -20,7 +20,7 @@ TryUse
|
|||
==============
|
||||
*/
|
||||
|
||||
#define USE_DISTANCE 64.0f
|
||||
static const double USE_DISTANCE = 64.0;
|
||||
/**
|
||||
* Try and use an entity in the world, directly ahead of us
|
||||
*/
|
||||
|
@ -146,7 +146,8 @@ static void P_DamageFeedback( gentity_t* player ) {
|
|||
ps->damageYaw = 255;
|
||||
|
||||
client->damage_fromWorld = qfalse;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
vectoangles(client->damage_from, angles);
|
||||
ps->damagePitch = angles[PITCH] / 360.0 * 256;
|
||||
ps->damageYaw = angles[YAW] / 360.0 * 256;
|
||||
|
@ -221,9 +222,11 @@ static void P_WorldEffects( gentity_t *ent ) {
|
|||
// play a gurp sound instead of a normal pain sound
|
||||
if (ent->health <= ent->damage) {
|
||||
G_Sound(ent, G_SoundIndex("*drown.wav"));
|
||||
} else if (rand()&1) {
|
||||
}
|
||||
else if (rand() & 1) {
|
||||
G_Sound(ent, G_SoundIndex("sound/player/gurp1.wav"));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
G_Sound(ent, G_SoundIndex("sound/player/gurp2.wav"));
|
||||
}
|
||||
|
||||
|
@ -234,7 +237,8 @@ static void P_WorldEffects( gentity_t *ent ) {
|
|||
ent->damage, DAMAGE_NO_ARMOR, MOD_WATER);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ent->client->airOutTime = level.time + 12000;
|
||||
ent->damage = 2;
|
||||
}
|
||||
|
@ -377,7 +381,8 @@ void G_TouchTriggers( gentity_t *ent ) {
|
|||
if (!BG_PlayerTouchesItem(&ent->client->ps, &hit->s, level.time)) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (!trap_EntityContact(mins, maxs, hit)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -553,7 +558,8 @@ static void ClientTimerActions( gentity_t* ent, int32_t msec ) {
|
|||
|
||||
if (rpg_timedmessagetime.value < 0.2f) { //1
|
||||
messageTime = 0.2f;
|
||||
}else{
|
||||
}
|
||||
else{
|
||||
messageTime = rpg_timedmessagetime.value;
|
||||
}
|
||||
|
||||
|
@ -629,7 +635,9 @@ typedef struct detHit_s
|
|||
int32_t time;
|
||||
} detHit_t;
|
||||
|
||||
#define MAX_DETHITS 32 // never define this to be 0
|
||||
enum g_activeDetPackLimits_e {
|
||||
MAX_DETHITS = 32 // never define this to be 0
|
||||
};
|
||||
|
||||
static detHit_t detHits[MAX_DETHITS];
|
||||
static qboolean bDetInit = qfalse;
|
||||
|
@ -638,8 +646,8 @@ static qboolean bDetInit = qfalse;
|
|||
extern qboolean FinishSpawningDecoy(gentity_t* ent, int32_t itemIndex);
|
||||
//-----------------------------------------------------------------------------DECOY TEMP
|
||||
|
||||
#define DETPACK_DAMAGE 750
|
||||
#define DETPACK_RADIUS 500
|
||||
static const uint16_t DETPACK_DAMAGE = 750;
|
||||
static const uint16_t DETPACK_RADIUS = 500;
|
||||
|
||||
void detpack_shot(gentity_t* self, gentity_t* inflictor, gentity_t* attacker, int32_t damage, int32_t meansOfDeath)
|
||||
{
|
||||
|
@ -921,12 +929,12 @@ void DetonateDetpack(gentity_t *ent) {
|
|||
|
||||
|
||||
|
||||
#define SHIELD_HEALTH 250
|
||||
#define SHIELD_HEALTH_DEC 10 // 25 seconds
|
||||
#define MAX_SHIELD_HEIGHT 1022 //254
|
||||
#define MAX_SHIELD_HALFWIDTH 1023 //255
|
||||
#define SHIELD_HALFTHICKNESS 4
|
||||
#define SHIELD_PLACEDIST 64
|
||||
static const uint8_t SHIELD_HEALTH = 250;
|
||||
static const uint8_t SHIELD_HEALTH_DEC = 10; // 25 seconds
|
||||
static const uint16_t MAX_SHIELD_HEIGHT = 1022; //254
|
||||
static const uint16_t MAX_SHIELD_HALFWIDTH = 1023; //255
|
||||
static const uint8_t SHIELD_HALFTHICKNESS = 4;
|
||||
static const uint8_t SHIELD_PLACEDIST = 64;
|
||||
|
||||
|
||||
static qhandle_t shieldAttachSound = 0;
|
||||
|
@ -1120,7 +1128,8 @@ void ShieldTouch(gentity_t* self, gentity_t* other, trace_t* trace)
|
|||
other->client->ps.stats[STAT_HEALTH] = other->health = 1;
|
||||
G_Client_Die(other, other, other, 1, MOD_FORCEFIELD);
|
||||
}
|
||||
}else{
|
||||
}
|
||||
else{
|
||||
if (other->health <= 1){
|
||||
other->client->ps.stats[STAT_HEALTH] = other->health = 0;
|
||||
G_Client_Die(other, other, other, 100000, MOD_FORCEFIELD);
|
||||
|
@ -1998,17 +2007,22 @@ static void ClientThink_real( gentity_t *ent ) {
|
|||
if (rpg_medicsrevive.integer == 1){
|
||||
if (client->noclip) {
|
||||
ps->pm_type = PM_NOCLIP;
|
||||
} else if ( ps->stats[STAT_HEALTH] == 1 ) {
|
||||
}
|
||||
else if (ps->stats[STAT_HEALTH] == 1) {
|
||||
ps->pm_type = PM_DEAD;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ps->pm_type = PM_NORMAL;
|
||||
}
|
||||
}else{
|
||||
}
|
||||
else{
|
||||
if (client->noclip) {
|
||||
ps->pm_type = PM_NOCLIP;
|
||||
} else if ( ps->stats[STAT_HEALTH] <= 0 ) {
|
||||
}
|
||||
else if (ps->stats[STAT_HEALTH] <= 0) {
|
||||
ps->pm_type = PM_DEAD;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ps->pm_type = PM_NORMAL;
|
||||
}
|
||||
}
|
||||
|
@ -2268,7 +2282,8 @@ static void SpectatorClientEndFrame( gentity_t *ent ) {
|
|||
// team follow1 and team follow2 go to whatever clients are playing
|
||||
if (clientNum == -1) {
|
||||
clientNum = level.follow1;
|
||||
} else if ( clientNum == -2 ) {
|
||||
}
|
||||
else if (clientNum == -2) {
|
||||
clientNum = level.follow2;
|
||||
}
|
||||
if (clientNum >= 0) {
|
||||
|
@ -2277,7 +2292,8 @@ static void SpectatorClientEndFrame( gentity_t *ent ) {
|
|||
ent->client->ps = cl->ps;
|
||||
ps->pm_flags |= PMF_FOLLOW;
|
||||
return;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// drop them to free spectators unless they are dedicated camera followers
|
||||
if (sess->spectatorClient >= 0) {
|
||||
sess->spectatorState = SPECTATOR_FREE;
|
||||
|
@ -2289,7 +2305,8 @@ static void SpectatorClientEndFrame( gentity_t *ent ) {
|
|||
|
||||
if (sess->spectatorState == SPECTATOR_SCOREBOARD) {
|
||||
ps->pm_flags |= PMF_SCOREBOARD;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ps->pm_flags &= ~PMF_SCOREBOARD;
|
||||
}
|
||||
}
|
||||
|
@ -2336,7 +2353,8 @@ void ClientEndFrame( gentity_t *ent ) {
|
|||
// add the EF_CONNECTION flag if we haven't gotten commands recently
|
||||
if (level.time - ent->client->lastCmdTime > 1000) {
|
||||
ent->s.eFlags |= EF_CONNECTION;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ent->s.eFlags &= ~EF_CONNECTION;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue