mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-26 22:21:16 +00:00
Elder:
Pre- 0-18-00 VMs Server-Side
This commit is contained in:
parent
d7b5d29544
commit
1cf37f2ff5
5 changed files with 37 additions and 24 deletions
|
@ -977,6 +977,8 @@ int ThrowWeapon( gentity_t *ent, qboolean forceThrow )
|
||||||
|
|
||||||
xr_drop= dropWeapon( ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM );
|
xr_drop= dropWeapon( ent, xr_item, 0, FL_DROPPED_ITEM | FL_THROWN_ITEM );
|
||||||
xr_drop->count= -1; // XRAY FMJ 0 is already taken, -1 means no ammo
|
xr_drop->count= -1; // XRAY FMJ 0 is already taken, -1 means no ammo
|
||||||
|
// remember who dropped you, child!
|
||||||
|
xr_drop->s.otherEntityNum = client->ps.clientNum;
|
||||||
client->uniqueWeapons--;
|
client->uniqueWeapons--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1706,9 +1706,11 @@ void Cmd_Bandage (gentity_t *ent)
|
||||||
^ ANIM_TOGGLEBIT ) | WP_ANIM_DISARM;
|
^ ANIM_TOGGLEBIT ) | WP_ANIM_DISARM;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Elder: always lower the player model
|
//Elder: always lower the player model -- removed
|
||||||
|
/*
|
||||||
ent->client->ps.torsoAnim = ( ( ent->client->ps.torsoAnim & ANIM_TOGGLEBIT )
|
ent->client->ps.torsoAnim = ( ( ent->client->ps.torsoAnim & ANIM_TOGGLEBIT )
|
||||||
^ ANIM_TOGGLEBIT ) | TORSO_DROP;
|
^ ANIM_TOGGLEBIT ) | TORSO_DROP;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
ent->client->ps.weaponTime += BLEED_BANDAGE_TIME;
|
ent->client->ps.weaponTime += BLEED_BANDAGE_TIME;
|
||||||
|
@ -2152,16 +2154,7 @@ void Cmd_OpenDoor(gentity_t *ent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hawkisn todo: Must be set on a per-weapon basis, not a per-user basis.
|
|
||||||
/* Homer: This function is useful only if it applies to all weapons, which is not the case here.
|
|
||||||
void toggleSemi(gentity_t *ent){
|
|
||||||
ent->client->semi = !(ent->client->semi);
|
|
||||||
if(ent->client->semi)
|
|
||||||
trap_SendServerCommand( ent-g_entities, va("print \"Switched to semi-automatic.\n\""));
|
|
||||||
else
|
|
||||||
trap_SendServerCommand( ent-g_entities, va("print \"Switched to full automatic.\n\""));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/* Hawkins. Reaction weapon command */
|
/* Hawkins. Reaction weapon command */
|
||||||
void Cmd_Weapon(gentity_t *ent)
|
void Cmd_Weapon(gentity_t *ent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -361,22 +361,22 @@ int Pickup_Weapon (gentity_t *ent, gentity_t *other, int bandolierFactor) {
|
||||||
break;
|
break;
|
||||||
case WP_AKIMBO:
|
case WP_AKIMBO:
|
||||||
//Elder: Should not need to come here
|
//Elder: Should not need to come here
|
||||||
ammotoadd= RQ3_AKIMBO_AMMO;
|
ammotoadd = RQ3_AKIMBO_AMMO;
|
||||||
break;
|
break;
|
||||||
case WP_MP5:
|
case WP_MP5:
|
||||||
ammotoadd= RQ3_MP5_AMMO;
|
ammotoadd = RQ3_MP5_AMMO;
|
||||||
other->client->uniqueWeapons++;
|
other->client->uniqueWeapons++;
|
||||||
break;
|
break;
|
||||||
case WP_M4:
|
case WP_M4:
|
||||||
ammotoadd= RQ3_M4_AMMO;
|
ammotoadd = RQ3_M4_AMMO;
|
||||||
other->client->uniqueWeapons++;
|
other->client->uniqueWeapons++;
|
||||||
break;
|
break;
|
||||||
case WP_M3:
|
case WP_M3:
|
||||||
ammotoadd= RQ3_M3_AMMO;
|
ammotoadd = RQ3_M3_AMMO;
|
||||||
other->client->uniqueWeapons++;
|
other->client->uniqueWeapons++;
|
||||||
break;
|
break;
|
||||||
case WP_HANDCANNON:
|
case WP_HANDCANNON:
|
||||||
ammotoadd= RQ3_HANDCANNON_AMMO;
|
ammotoadd = RQ3_HANDCANNON_AMMO;
|
||||||
//Elder: HC gets 2 in chamber and 5 in reserve
|
//Elder: HC gets 2 in chamber and 5 in reserve
|
||||||
//Also sync with M3
|
//Also sync with M3
|
||||||
//Removed until we can store the amount of ammo in the gun
|
//Removed until we can store the amount of ammo in the gun
|
||||||
|
@ -386,7 +386,7 @@ int Pickup_Weapon (gentity_t *ent, gentity_t *other, int bandolierFactor) {
|
||||||
other->client->uniqueWeapons++;
|
other->client->uniqueWeapons++;
|
||||||
break;
|
break;
|
||||||
case WP_SSG3000:
|
case WP_SSG3000:
|
||||||
ammotoadd= RQ3_SSG3000_AMMO;
|
ammotoadd = RQ3_SSG3000_AMMO;
|
||||||
other->client->uniqueWeapons++;
|
other->client->uniqueWeapons++;
|
||||||
break;
|
break;
|
||||||
case WP_GRENADE:
|
case WP_GRENADE:
|
||||||
|
@ -402,13 +402,15 @@ int Pickup_Weapon (gentity_t *ent, gentity_t *other, int bandolierFactor) {
|
||||||
default:
|
default:
|
||||||
//Blaze: Should never hit here
|
//Blaze: Should never hit here
|
||||||
G_Printf("Pickup_Weapon: Given bad giTag: %d\n", ent->item->giTag);
|
G_Printf("Pickup_Weapon: Given bad giTag: %d\n", ent->item->giTag);
|
||||||
ammotoadd=0;
|
ammotoadd = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//Elder: conditional added to "restore" weapons
|
//Elder: conditional added to "restore" weapons
|
||||||
if ( other->client->pers.hadUniqueWeapon[ent->item->giTag] == qfalse ||
|
if ( !(ent->flags & FL_THROWN_ITEM) ||
|
||||||
!((ent->flags & FL_THROWN_ITEM) == FL_THROWN_ITEM) ) {
|
(ent->s.otherEntityNum == other->client->ps.clientNum &&
|
||||||
other->client->ps.ammo[ent->item->giTag]= ammotoadd;
|
other->client->pers.hadUniqueWeapon[ent->item->giTag] == qfalse ) )
|
||||||
|
{
|
||||||
|
other->client->ps.ammo[ent->item->giTag] = ammotoadd;
|
||||||
//Elder: add extra handcannon clips if it's "fresh"
|
//Elder: add extra handcannon clips if it's "fresh"
|
||||||
if (ent->item->giTag == WP_HANDCANNON) {
|
if (ent->item->giTag == WP_HANDCANNON) {
|
||||||
other->client->numClips[ WP_HANDCANNON ] += 5;
|
other->client->numClips[ WP_HANDCANNON ] += 5;
|
||||||
|
@ -420,6 +422,22 @@ int Pickup_Weapon (gentity_t *ent, gentity_t *other, int bandolierFactor) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if ( other->client->pers.hadUniqueWeapon[ent->item->giTag] == qfalse ||
|
||||||
|
!(ent->flags & FL_THROWN_ITEM) ) {
|
||||||
|
other->client->ps.ammo[ent->item->giTag] = ammotoadd;
|
||||||
|
//Elder: add extra handcannon clips if it's "fresh"
|
||||||
|
if (ent->item->giTag == WP_HANDCANNON) {
|
||||||
|
other->client->numClips[ WP_HANDCANNON ] += 5;
|
||||||
|
other->client->numClips[ WP_M3 ] += 5;
|
||||||
|
if (other->client->numClips[ WP_HANDCANNON ] > 13) {
|
||||||
|
other->client->numClips[ WP_HANDCANNON ] = 14;
|
||||||
|
other->client->numClips[ WP_M3 ] = 14;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// End Duffman
|
// End Duffman
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -572,7 +572,7 @@ void G_BreakGlass( gentity_t *ent, vec3_t point, int mod )
|
||||||
|
|
||||||
}
|
}
|
||||||
G_FreeEntity( ent );
|
G_FreeEntity( ent );
|
||||||
G_Printf("%s shift: %i\n", vtos(impactPoint), shiftCount);
|
//G_Printf("%s shift: %i\n", vtos(impactPoint), shiftCount);
|
||||||
switch ( shiftCount )
|
switch ( shiftCount )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
@ -2408,14 +2408,14 @@ void ReloadWeapon ( gentity_t *ent, int stage )
|
||||||
if (stage == 1 && (ent->client->ps.weapon == WP_SSG3000 ||
|
if (stage == 1 && (ent->client->ps.weapon == WP_SSG3000 ||
|
||||||
ent->client->ps.weapon == WP_M3) )
|
ent->client->ps.weapon == WP_M3) )
|
||||||
{
|
{
|
||||||
G_Printf("Hit server-side reload stage 1\n");
|
//G_Printf("Hit server-side reload stage 1\n");
|
||||||
if ( ent->client->ps.weapon == WP_M3 )
|
if ( ent->client->ps.weapon == WP_M3 )
|
||||||
ent->client->numClips[WP_HANDCANNON] = ent->client->numClips[WP_M3];
|
ent->client->numClips[WP_HANDCANNON] = ent->client->numClips[WP_M3];
|
||||||
ent->client->numClips[ent->client->ps.weapon]--;
|
ent->client->numClips[ent->client->ps.weapon]--;
|
||||||
}
|
}
|
||||||
else if (stage == 2)
|
else if (stage == 2)
|
||||||
{
|
{
|
||||||
G_Printf("Hit server-side reload stage 2\n");
|
//G_Printf("Hit server-side reload stage 2\n");
|
||||||
ent->client->numClips[ent->client->ps.weapon]--;
|
ent->client->numClips[ent->client->ps.weapon]--;
|
||||||
// remove an extra clip if using HC or Akimbos
|
// remove an extra clip if using HC or Akimbos
|
||||||
if (ent->client->ps.weapon == WP_HANDCANNON ||
|
if (ent->client->ps.weapon == WP_HANDCANNON ||
|
||||||
|
|
Loading…
Reference in a new issue