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->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--;
|
||||
}
|
||||
|
||||
|
|
|
@ -1706,9 +1706,11 @@ void Cmd_Bandage (gentity_t *ent)
|
|||
^ 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 )
|
||||
^ ANIM_TOGGLEBIT ) | TORSO_DROP;
|
||||
*/
|
||||
|
||||
|
||||
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 */
|
||||
void Cmd_Weapon(gentity_t *ent)
|
||||
{
|
||||
|
|
|
@ -406,8 +406,10 @@ int Pickup_Weapon (gentity_t *ent, gentity_t *other, int bandolierFactor) {
|
|||
break;
|
||||
}
|
||||
//Elder: conditional added to "restore" weapons
|
||||
if ( other->client->pers.hadUniqueWeapon[ent->item->giTag] == qfalse ||
|
||||
!((ent->flags & FL_THROWN_ITEM) == FL_THROWN_ITEM) ) {
|
||||
if ( !(ent->flags & FL_THROWN_ITEM) ||
|
||||
(ent->s.otherEntityNum == other->client->ps.clientNum &&
|
||||
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"
|
||||
if (ent->item->giTag == WP_HANDCANNON) {
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -572,7 +572,7 @@ void G_BreakGlass( gentity_t *ent, vec3_t point, int mod )
|
|||
|
||||
}
|
||||
G_FreeEntity( ent );
|
||||
G_Printf("%s shift: %i\n", vtos(impactPoint), shiftCount);
|
||||
//G_Printf("%s shift: %i\n", vtos(impactPoint), shiftCount);
|
||||
switch ( shiftCount )
|
||||
{
|
||||
case 0:
|
||||
|
|
|
@ -2408,14 +2408,14 @@ void ReloadWeapon ( gentity_t *ent, int stage )
|
|||
if (stage == 1 && (ent->client->ps.weapon == WP_SSG3000 ||
|
||||
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 )
|
||||
ent->client->numClips[WP_HANDCANNON] = ent->client->numClips[WP_M3];
|
||||
ent->client->numClips[ent->client->ps.weapon]--;
|
||||
}
|
||||
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]--;
|
||||
// remove an extra clip if using HC or Akimbos
|
||||
if (ent->client->ps.weapon == WP_HANDCANNON ||
|
||||
|
|
Loading…
Reference in a new issue