mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-03-02 15:22:27 +00:00
Elder:
0-15-00 VMs Server-side
This commit is contained in:
parent
19d863fa5d
commit
4f41b8b094
6 changed files with 108 additions and 20 deletions
|
@ -1656,7 +1656,9 @@ static void PM_CheckDuck (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pm->ps->pm_flags & PMF_DUCKED)
|
// Elder: don't allow mid-air "crouching"
|
||||||
|
// Removed because it was causing problems -- WTF is the "jump" flag?
|
||||||
|
if (pm->ps->pm_flags & PMF_DUCKED )// && pm->ps->groundEntityNum != ENTITYNUM_NONE)
|
||||||
{
|
{
|
||||||
pm->maxs[2] = 16;
|
pm->maxs[2] = 16;
|
||||||
pm->ps->viewheight = CROUCH_VIEWHEIGHT;
|
pm->ps->viewheight = CROUCH_VIEWHEIGHT;
|
||||||
|
@ -1888,6 +1890,7 @@ static void PM_BeginWeaponChange( int weapon ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Elder: temp hack
|
//Elder: temp hack
|
||||||
|
/*
|
||||||
if (pm->ps->weapon == WP_PISTOL ||
|
if (pm->ps->weapon == WP_PISTOL ||
|
||||||
pm->ps->weapon == WP_M3 ||
|
pm->ps->weapon == WP_M3 ||
|
||||||
pm->ps->weapon == WP_HANDCANNON ||
|
pm->ps->weapon == WP_HANDCANNON ||
|
||||||
|
@ -1897,8 +1900,12 @@ static void PM_BeginWeaponChange( int weapon ) {
|
||||||
pm->ps->weapon == WP_GRENADE ||
|
pm->ps->weapon == WP_GRENADE ||
|
||||||
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
||||||
PM_StartWeaponAnim(WP_ANIM_DISARM);
|
PM_StartWeaponAnim(WP_ANIM_DISARM);
|
||||||
else if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
else
|
||||||
|
*/
|
||||||
|
if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
||||||
PM_StartWeaponAnim(WP_ANIM_THROWDISARM);
|
PM_StartWeaponAnim(WP_ANIM_THROWDISARM);
|
||||||
|
else
|
||||||
|
PM_StartWeaponAnim(WP_ANIM_DISARM);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Elder: cancel reload stuff here
|
// Elder: cancel reload stuff here
|
||||||
|
@ -1911,17 +1918,22 @@ static void PM_BeginWeaponChange( int weapon ) {
|
||||||
pm->ps->weaponstate = WEAPON_DROPPING;
|
pm->ps->weaponstate = WEAPON_DROPPING;
|
||||||
|
|
||||||
//Elder: temp hack
|
//Elder: temp hack
|
||||||
|
/*
|
||||||
if (pm->ps->weapon == WP_PISTOL ||
|
if (pm->ps->weapon == WP_PISTOL ||
|
||||||
pm->ps->weapon == WP_M3 ||
|
pm->ps->weapon == WP_M3 ||
|
||||||
pm->ps->weapon == WP_HANDCANNON ||
|
pm->ps->weapon == WP_HANDCANNON ||
|
||||||
pm->ps->weapon == WP_SSG3000 ||
|
pm->ps->weapon == WP_SSG3000 ||
|
||||||
pm->ps->weapon == WP_M4 ||
|
pm->ps->weapon == WP_M4 ||
|
||||||
|
pm->ps->weapon == WP_MP5 ||
|
||||||
pm->ps->weapon == WP_AKIMBO ||
|
pm->ps->weapon == WP_AKIMBO ||
|
||||||
pm->ps->weapon == WP_GRENADE ||
|
pm->ps->weapon == WP_GRENADE ||
|
||||||
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
||||||
PM_StartWeaponAnim(WP_ANIM_DISARM);
|
PM_StartWeaponAnim(WP_ANIM_DISARM);
|
||||||
else if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
else*/
|
||||||
|
if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
||||||
PM_StartWeaponAnim(WP_ANIM_THROWDISARM);
|
PM_StartWeaponAnim(WP_ANIM_THROWDISARM);
|
||||||
|
else
|
||||||
|
PM_StartWeaponAnim(WP_ANIM_DISARM);
|
||||||
|
|
||||||
PM_StartTorsoAnim( TORSO_DROP );
|
PM_StartTorsoAnim( TORSO_DROP );
|
||||||
}
|
}
|
||||||
|
@ -1992,17 +2004,23 @@ static void PM_FinishWeaponChange( void ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Elder: temp hack
|
//Elder: temp hack
|
||||||
|
/*
|
||||||
if (pm->ps->weapon == WP_PISTOL ||
|
if (pm->ps->weapon == WP_PISTOL ||
|
||||||
pm->ps->weapon == WP_M3 ||
|
pm->ps->weapon == WP_M3 ||
|
||||||
pm->ps->weapon == WP_HANDCANNON ||
|
pm->ps->weapon == WP_HANDCANNON ||
|
||||||
pm->ps->weapon == WP_SSG3000 ||
|
pm->ps->weapon == WP_SSG3000 ||
|
||||||
pm->ps->weapon == WP_M4 ||
|
pm->ps->weapon == WP_M4 ||
|
||||||
|
pm->ps->weapon == WP_MP5 ||
|
||||||
pm->ps->weapon == WP_AKIMBO ||
|
pm->ps->weapon == WP_AKIMBO ||
|
||||||
pm->ps->weapon == WP_GRENADE ||
|
pm->ps->weapon == WP_GRENADE ||
|
||||||
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
||||||
PM_StartWeaponAnim(WP_ANIM_ACTIVATE);
|
PM_StartWeaponAnim(WP_ANIM_ACTIVATE);
|
||||||
else if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
*/
|
||||||
|
/*else*/
|
||||||
|
if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
||||||
PM_StartWeaponAnim(WP_ANIM_THROWACTIVATE);
|
PM_StartWeaponAnim(WP_ANIM_THROWACTIVATE);
|
||||||
|
else
|
||||||
|
PM_StartWeaponAnim(WP_ANIM_ACTIVATE);
|
||||||
|
|
||||||
PM_StartTorsoAnim( TORSO_RAISE );
|
PM_StartTorsoAnim( TORSO_RAISE );
|
||||||
|
|
||||||
|
@ -2027,17 +2045,22 @@ static void PM_TorsoAnimation( void ) {
|
||||||
//Elder: temp hack
|
//Elder: temp hack
|
||||||
if (pm->ps->ammo[pm->ps->weapon] == 0)
|
if (pm->ps->ammo[pm->ps->weapon] == 0)
|
||||||
PM_ContinueWeaponAnim( WP_ANIM_EMPTY );
|
PM_ContinueWeaponAnim( WP_ANIM_EMPTY );
|
||||||
|
/*
|
||||||
else if (pm->ps->weapon == WP_PISTOL ||
|
else if (pm->ps->weapon == WP_PISTOL ||
|
||||||
pm->ps->weapon == WP_M3 ||
|
pm->ps->weapon == WP_M3 ||
|
||||||
pm->ps->weapon == WP_HANDCANNON ||
|
pm->ps->weapon == WP_HANDCANNON ||
|
||||||
pm->ps->weapon == WP_SSG3000 ||
|
pm->ps->weapon == WP_SSG3000 ||
|
||||||
pm->ps->weapon == WP_M4 ||
|
pm->ps->weapon == WP_M4 ||
|
||||||
|
pm->ps->weapon == WP_MP5 ||
|
||||||
pm->ps->weapon == WP_AKIMBO ||
|
pm->ps->weapon == WP_AKIMBO ||
|
||||||
pm->ps->weapon == WP_GRENADE ||
|
pm->ps->weapon == WP_GRENADE ||
|
||||||
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
||||||
PM_ContinueWeaponAnim(WP_ANIM_IDLE);
|
PM_ContinueWeaponAnim(WP_ANIM_IDLE);
|
||||||
|
*/
|
||||||
else if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
else if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
||||||
PM_ContinueWeaponAnim(WP_ANIM_THROWIDLE);
|
PM_ContinueWeaponAnim(WP_ANIM_THROWIDLE);
|
||||||
|
else
|
||||||
|
PM_ContinueWeaponAnim(WP_ANIM_IDLE);
|
||||||
|
|
||||||
// PM_ContinueWeaponAnim( WP_ANIM_READY );
|
// PM_ContinueWeaponAnim( WP_ANIM_READY );
|
||||||
|
|
||||||
|
@ -2534,18 +2557,23 @@ static void PM_Weapon( void ) {
|
||||||
{
|
{
|
||||||
if (pm->ps->ammo[pm->ps->weapon] == 0)
|
if (pm->ps->ammo[pm->ps->weapon] == 0)
|
||||||
PM_ContinueWeaponAnim( WP_ANIM_EMPTY );
|
PM_ContinueWeaponAnim( WP_ANIM_EMPTY );
|
||||||
|
/*
|
||||||
else if (pm->ps->weapon == WP_PISTOL ||
|
else if (pm->ps->weapon == WP_PISTOL ||
|
||||||
pm->ps->weapon == WP_M3 ||
|
pm->ps->weapon == WP_M3 ||
|
||||||
pm->ps->weapon == WP_HANDCANNON ||
|
pm->ps->weapon == WP_HANDCANNON ||
|
||||||
pm->ps->weapon == WP_SSG3000 ||
|
pm->ps->weapon == WP_SSG3000 ||
|
||||||
pm->ps->weapon == WP_M4 ||
|
pm->ps->weapon == WP_M4 ||
|
||||||
|
pm->ps->weapon == WP_MP5 ||
|
||||||
pm->ps->weapon == WP_AKIMBO ||
|
pm->ps->weapon == WP_AKIMBO ||
|
||||||
pm->ps->weapon == WP_GRENADE ||
|
pm->ps->weapon == WP_GRENADE ||
|
||||||
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
||||||
PM_ContinueWeaponAnim(WP_ANIM_IDLE);
|
PM_ContinueWeaponAnim(WP_ANIM_IDLE);
|
||||||
|
*/
|
||||||
else if (pm->ps->weapon == WP_KNIFE &&
|
else if (pm->ps->weapon == WP_KNIFE &&
|
||||||
!(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
!(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
||||||
PM_ContinueWeaponAnim(WP_ANIM_THROWIDLE);
|
PM_ContinueWeaponAnim(WP_ANIM_THROWIDLE);
|
||||||
|
else
|
||||||
|
PM_ContinueWeaponAnim(WP_ANIM_IDLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2590,17 +2618,22 @@ static void PM_Weapon( void ) {
|
||||||
// temp hack
|
// temp hack
|
||||||
if (pm->ps->ammo[pm->ps->weapon] == 0)
|
if (pm->ps->ammo[pm->ps->weapon] == 0)
|
||||||
PM_ContinueWeaponAnim( WP_ANIM_EMPTY );
|
PM_ContinueWeaponAnim( WP_ANIM_EMPTY );
|
||||||
|
/*
|
||||||
else if (pm->ps->weapon == WP_PISTOL ||
|
else if (pm->ps->weapon == WP_PISTOL ||
|
||||||
pm->ps->weapon == WP_M3 ||
|
pm->ps->weapon == WP_M3 ||
|
||||||
pm->ps->weapon == WP_HANDCANNON ||
|
pm->ps->weapon == WP_HANDCANNON ||
|
||||||
pm->ps->weapon == WP_SSG3000 ||
|
pm->ps->weapon == WP_SSG3000 ||
|
||||||
pm->ps->weapon == WP_M4 ||
|
pm->ps->weapon == WP_M4 ||
|
||||||
|
pm->ps->weapon == WP_MP5 ||
|
||||||
pm->ps->weapon == WP_AKIMBO ||
|
pm->ps->weapon == WP_AKIMBO ||
|
||||||
pm->ps->weapon == WP_GRENADE ||
|
pm->ps->weapon == WP_GRENADE ||
|
||||||
(pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
(pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
||||||
PM_StartWeaponAnim( WP_ANIM_IDLE );
|
PM_StartWeaponAnim( WP_ANIM_IDLE );
|
||||||
|
*/
|
||||||
else if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
else if (pm->ps->weapon == WP_KNIFE && !(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
||||||
PM_StartWeaponAnim( WP_ANIM_THROWIDLE );
|
PM_StartWeaponAnim( WP_ANIM_THROWIDLE );
|
||||||
|
else
|
||||||
|
PM_StartWeaponAnim( WP_ANIM_IDLE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2665,14 +2698,15 @@ static void PM_Weapon( void ) {
|
||||||
|
|
||||||
//Elder: custom player model fire animations go here
|
//Elder: custom player model fire animations go here
|
||||||
// start the animation even if out of ammo -- Elder: NO WAY
|
// start the animation even if out of ammo -- Elder: NO WAY
|
||||||
if ( pm->ps->weapon == WP_KNIFE ) {
|
if ( pm->ps->weapon == WP_KNIFE || pm->ps->weapon == WP_GRENADE ) {
|
||||||
// the gauntlet only "fires" when it actually hits something
|
// the gauntlet only "fires" when it actually hits something
|
||||||
// if ( !pm->gauntletHit ) {
|
// if ( !pm->gauntletHit ) {
|
||||||
// pm->ps->weaponTime = 0;
|
// pm->ps->weaponTime = 0;
|
||||||
// pm->ps->weaponstate = WEAPON_READY;
|
// pm->ps->weaponstate = WEAPON_READY;
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
if (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)
|
if ( pm->ps->weapon == WP_GRENADE ||
|
||||||
|
(pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE) )
|
||||||
PM_StartWeaponAnim( WP_ANIM_FIRE );
|
PM_StartWeaponAnim( WP_ANIM_FIRE );
|
||||||
else
|
else
|
||||||
PM_StartWeaponAnim( WP_ANIM_THROWFIRE );
|
PM_StartWeaponAnim( WP_ANIM_THROWFIRE );
|
||||||
|
@ -2697,12 +2731,13 @@ static void PM_Weapon( void ) {
|
||||||
if ( !pm->ps->stats[STAT_BURST] )
|
if ( !pm->ps->stats[STAT_BURST] )
|
||||||
PM_StartWeaponAnim( WP_ANIM_FIRE );
|
PM_StartWeaponAnim( WP_ANIM_FIRE );
|
||||||
}
|
}
|
||||||
else if (pm->ps->weapon == WP_PISTOL ||
|
else /* if (pm->ps->weapon == WP_PISTOL ||
|
||||||
pm->ps->weapon == WP_M3 ||
|
pm->ps->weapon == WP_M3 ||
|
||||||
pm->ps->weapon == WP_HANDCANNON ||
|
pm->ps->weapon == WP_HANDCANNON ||
|
||||||
pm->ps->weapon == WP_SSG3000 ||
|
pm->ps->weapon == WP_SSG3000 ||
|
||||||
pm->ps->weapon == WP_M4 ||
|
pm->ps->weapon == WP_M4 ||
|
||||||
pm->ps->weapon == WP_GRENADE)
|
pm->ps->weapon == WP_MP5 ||
|
||||||
|
pm->ps->weapon == WP_GRENADE) */
|
||||||
PM_StartWeaponAnim( WP_ANIM_FIRE );
|
PM_StartWeaponAnim( WP_ANIM_FIRE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3374,6 +3409,7 @@ void PmoveSingle (pmove_t *pmove) {
|
||||||
|
|
||||||
//weapon animations(rq3 specific)
|
//weapon animations(rq3 specific)
|
||||||
//Elder: temp hack to avoid messing up fast-reloads
|
//Elder: temp hack to avoid messing up fast-reloads
|
||||||
|
/*
|
||||||
if (pm->ps->weapon == WP_PISTOL ||
|
if (pm->ps->weapon == WP_PISTOL ||
|
||||||
pm->ps->weapon == WP_M3 ||
|
pm->ps->weapon == WP_M3 ||
|
||||||
pm->ps->weapon == WP_HANDCANNON ||
|
pm->ps->weapon == WP_HANDCANNON ||
|
||||||
|
@ -3383,6 +3419,7 @@ void PmoveSingle (pmove_t *pmove) {
|
||||||
pm->ps->weapon == WP_GRENADE ||
|
pm->ps->weapon == WP_GRENADE ||
|
||||||
pm->ps->weapon == WP_KNIFE)
|
pm->ps->weapon == WP_KNIFE)
|
||||||
PM_WeaponAnimation();
|
PM_WeaponAnimation();
|
||||||
|
*/
|
||||||
|
|
||||||
// torso animation
|
// torso animation
|
||||||
PM_TorsoAnimation();
|
PM_TorsoAnimation();
|
||||||
|
|
|
@ -41,11 +41,12 @@
|
||||||
#define VOTE_TIME 30000 // 30 seconds before vote times out
|
#define VOTE_TIME 30000 // 30 seconds before vote times out
|
||||||
|
|
||||||
#define MINS_Z -24
|
#define MINS_Z -24
|
||||||
#define DEFAULT_VIEWHEIGHT 22
|
//#define DEFAULT_VIEWHEIGHT 22
|
||||||
//#define DEFAULT_VIEWHEIGHT 26
|
#define DEFAULT_VIEWHEIGHT 26
|
||||||
//Elder: changed to 8 like AQ2 source
|
//Elder: changed to 8 like AQ2 source
|
||||||
#define CROUCH_VIEWHEIGHT 8
|
//Elder: moved back to original viewheight
|
||||||
//#define CROUCH_VIEWHEIGHT 12
|
//#define CROUCH_VIEWHEIGHT 8
|
||||||
|
#define CROUCH_VIEWHEIGHT 12
|
||||||
#define DEAD_VIEWHEIGHT -16
|
#define DEAD_VIEWHEIGHT -16
|
||||||
|
|
||||||
//Elder: New breakable bit definitions
|
//Elder: New breakable bit definitions
|
||||||
|
@ -606,6 +607,26 @@ typedef enum {
|
||||||
WP_NONE,
|
WP_NONE,
|
||||||
//Blaze: Reaction Weapons
|
//Blaze: Reaction Weapons
|
||||||
//Remember to put them in the right spots
|
//Remember to put them in the right spots
|
||||||
|
/*
|
||||||
|
MK23 Pistol
|
||||||
|
M3 Super 90 Assault Shotgun
|
||||||
|
MP5/10 Submachinegun
|
||||||
|
Handcannon
|
||||||
|
Sniper Rifle
|
||||||
|
M4 Assault Rifle
|
||||||
|
Dual MK23 Pistols
|
||||||
|
Combat Knife
|
||||||
|
*/
|
||||||
|
WP_PISTOL,
|
||||||
|
WP_M3,
|
||||||
|
WP_MP5,
|
||||||
|
WP_HANDCANNON,
|
||||||
|
WP_SSG3000,
|
||||||
|
WP_M4,
|
||||||
|
WP_AKIMBO,
|
||||||
|
WP_KNIFE,
|
||||||
|
WP_GRENADE,
|
||||||
|
/*
|
||||||
WP_KNIFE,
|
WP_KNIFE,
|
||||||
WP_PISTOL,
|
WP_PISTOL,
|
||||||
WP_M4,
|
WP_M4,
|
||||||
|
@ -615,6 +636,7 @@ typedef enum {
|
||||||
WP_HANDCANNON,
|
WP_HANDCANNON,
|
||||||
WP_AKIMBO,
|
WP_AKIMBO,
|
||||||
WP_GRENADE,
|
WP_GRENADE,
|
||||||
|
*/
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
WP_NAILGUN,
|
WP_NAILGUN,
|
||||||
WP_PROX_LAUNCHER,
|
WP_PROX_LAUNCHER,
|
||||||
|
|
|
@ -1359,6 +1359,8 @@ void ClientSpawn(gentity_t *ent) {
|
||||||
// spawn given items have fired
|
// spawn given items have fired
|
||||||
client->ps.weapon = 1;
|
client->ps.weapon = 1;
|
||||||
for ( i = WP_NUM_WEAPONS - 1 ; i > 0 ; i-- ) {
|
for ( i = WP_NUM_WEAPONS - 1 ; i > 0 ; i-- ) {
|
||||||
|
if ( i == WP_KNIFE )
|
||||||
|
continue;
|
||||||
if ( client->ps.stats[STAT_WEAPONS] & ( 1 << i ) ) {
|
if ( client->ps.stats[STAT_WEAPONS] & ( 1 << i ) ) {
|
||||||
client->ps.weapon = i;
|
client->ps.weapon = i;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1680,11 +1680,13 @@ void Cmd_Bandage (gentity_t *ent)
|
||||||
ent->client->ps.weaponstate = WEAPON_DROPPING;
|
ent->client->ps.weaponstate = WEAPON_DROPPING;
|
||||||
|
|
||||||
//Elder: temp hack
|
//Elder: temp hack
|
||||||
|
/*
|
||||||
if (ent->client->ps.weapon == WP_PISTOL ||
|
if (ent->client->ps.weapon == WP_PISTOL ||
|
||||||
ent->client->ps.weapon == WP_M3 ||
|
ent->client->ps.weapon == WP_M3 ||
|
||||||
ent->client->ps.weapon == WP_HANDCANNON ||
|
ent->client->ps.weapon == WP_HANDCANNON ||
|
||||||
ent->client->ps.weapon == WP_SSG3000 ||
|
ent->client->ps.weapon == WP_SSG3000 ||
|
||||||
ent->client->ps.weapon == WP_M4 ||
|
ent->client->ps.weapon == WP_M4 ||
|
||||||
|
ent->client->ps.weapon == WP_MP5 ||
|
||||||
ent->client->ps.weapon == WP_AKIMBO ||
|
ent->client->ps.weapon == WP_AKIMBO ||
|
||||||
ent->client->ps.weapon == WP_GRENADE ||
|
ent->client->ps.weapon == WP_GRENADE ||
|
||||||
(ent->client->ps.weapon == WP_KNIFE && !(ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
(ent->client->ps.weapon == WP_KNIFE && !(ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE)))
|
||||||
|
@ -1692,11 +1694,17 @@ void Cmd_Bandage (gentity_t *ent)
|
||||||
ent->client->ps.generic1 = ( ( ent->client->ps.generic1 & ANIM_TOGGLEBIT )
|
ent->client->ps.generic1 = ( ( ent->client->ps.generic1 & ANIM_TOGGLEBIT )
|
||||||
^ ANIM_TOGGLEBIT ) | WP_ANIM_DISARM;
|
^ ANIM_TOGGLEBIT ) | WP_ANIM_DISARM;
|
||||||
}
|
}
|
||||||
else if (ent->client->ps.weapon == WP_KNIFE && (ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
else */
|
||||||
|
if (ent->client->ps.weapon == WP_KNIFE && (ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE))
|
||||||
{
|
{
|
||||||
ent->client->ps.generic1 = ( ( ent->client->ps.generic1 & ANIM_TOGGLEBIT )
|
ent->client->ps.generic1 = ( ( ent->client->ps.generic1 & ANIM_TOGGLEBIT )
|
||||||
^ ANIM_TOGGLEBIT ) | WP_ANIM_THROWDISARM;
|
^ ANIM_TOGGLEBIT ) | WP_ANIM_THROWDISARM;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ent->client->ps.generic1 = ( ( ent->client->ps.generic1 & ANIM_TOGGLEBIT )
|
||||||
|
^ ANIM_TOGGLEBIT ) | WP_ANIM_DISARM;
|
||||||
|
}
|
||||||
|
|
||||||
//Elder: always lower the player model
|
//Elder: always lower the player model
|
||||||
ent->client->ps.torsoAnim = ( ( ent->client->ps.torsoAnim & ANIM_TOGGLEBIT )
|
ent->client->ps.torsoAnim = ( ( ent->client->ps.torsoAnim & ANIM_TOGGLEBIT )
|
||||||
|
|
|
@ -901,7 +901,7 @@ gentity_t *LaunchItem( gitem_t *item, vec3_t origin, vec3_t velocity, int xr_fla
|
||||||
|
|
||||||
dropped->s.eType = ET_ITEM;
|
dropped->s.eType = ET_ITEM;
|
||||||
dropped->s.modelindex = item - bg_itemlist; // store item number in modelindex
|
dropped->s.modelindex = item - bg_itemlist; // store item number in modelindex
|
||||||
dropped->s.modelindex2 = 1; // This is non-zero is it's a dropped item
|
dropped->s.modelindex2 = 1; // This is non-zero if it's a dropped item
|
||||||
|
|
||||||
dropped->classname = item->classname;
|
dropped->classname = item->classname;
|
||||||
dropped->item = item;
|
dropped->item = item;
|
||||||
|
@ -956,8 +956,9 @@ gentity_t *LaunchItem( gitem_t *item, vec3_t origin, vec3_t velocity, int xr_fla
|
||||||
dropped->think = RQ3_DroppedItemThink;
|
dropped->think = RQ3_DroppedItemThink;
|
||||||
dropped->nextthink = level.time + RQ3_RESPAWNTIME_DEFAULT;
|
dropped->nextthink = level.time + RQ3_RESPAWNTIME_DEFAULT;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
else { // auto-remove after 30 seconds
|
{
|
||||||
|
// auto-remove after 30 seconds
|
||||||
dropped->think = G_FreeEntity;
|
dropped->think = G_FreeEntity;
|
||||||
dropped->nextthink = level.time + 30000;
|
dropped->nextthink = level.time + 30000;
|
||||||
}
|
}
|
||||||
|
@ -965,8 +966,8 @@ gentity_t *LaunchItem( gitem_t *item, vec3_t origin, vec3_t velocity, int xr_fla
|
||||||
dropped->flags = xr_flags;//FL_DROPPED_ITEM;
|
dropped->flags = xr_flags;//FL_DROPPED_ITEM;
|
||||||
if( xr_flags & FL_THROWN_ITEM) {
|
if( xr_flags & FL_THROWN_ITEM) {
|
||||||
//Elder: we don't want it to clip against players
|
//Elder: we don't want it to clip against players
|
||||||
dropped->clipmask = MASK_SOLID; //MASK_SHOT
|
dropped->clipmask = MASK_SOLID; //MASK_SHOT
|
||||||
dropped->s.pos.trTime = level.time; // +50; no pre-step if it doesn't clip players
|
dropped->s.pos.trTime = level.time; // +50; no pre-step if it doesn't clip players
|
||||||
VectorScale( velocity, 40, dropped->s.pos.trDelta ); // 700 500 400
|
VectorScale( velocity, 40, dropped->s.pos.trDelta ); // 700 500 400
|
||||||
SnapVector( dropped->s.pos.trDelta ); // save net bandwidth
|
SnapVector( dropped->s.pos.trDelta ); // save net bandwidth
|
||||||
dropped->physicsBounce = 0.1f;
|
dropped->physicsBounce = 0.1f;
|
||||||
|
@ -1300,8 +1301,9 @@ be on an entity that hasn't spawned yet.
|
||||||
void G_SpawnItem (gentity_t *ent, gitem_t *item) {
|
void G_SpawnItem (gentity_t *ent, gitem_t *item) {
|
||||||
G_SpawnFloat( "random", "0", &ent->random );
|
G_SpawnFloat( "random", "0", &ent->random );
|
||||||
G_SpawnFloat( "wait", "0", &ent->wait );
|
G_SpawnFloat( "wait", "0", &ent->wait );
|
||||||
|
|
||||||
//TODO: check spawn angles; client-side should make use of them too
|
//Elder: check spawn angles; client-side should make use of them too
|
||||||
|
G_SpawnFloat( "angle", "0", &ent->s.angles[1] );
|
||||||
|
|
||||||
RegisterItem( item );
|
RegisterItem( item );
|
||||||
if ( G_ItemDisabled(item) )
|
if ( G_ItemDisabled(item) )
|
||||||
|
@ -1407,6 +1409,14 @@ void G_RunItem( gentity_t *ent ) {
|
||||||
tr.fraction = 0;
|
tr.fraction = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ent->flags & FL_DROPPED_ITEM && VectorLength(ent->s.pos.trDelta) != 0 &&
|
||||||
|
(ent->item->giType == IT_WEAPON || ent->item->giType == IT_HOLDABLE) )
|
||||||
|
{
|
||||||
|
// calculate spin -- should be identical to cg.autoAngles
|
||||||
|
//cg.autoAnglesFast[1] = ( cg.time & 1023 ) * 360 / 1024.0f;
|
||||||
|
ent->s.angles[1] = ( level.time & 1023 ) * 360 / 1024.0f;
|
||||||
|
}
|
||||||
|
|
||||||
trap_LinkEntity( ent ); // FIXME: avoid this for stationary?
|
trap_LinkEntity( ent ); // FIXME: avoid this for stationary?
|
||||||
|
|
||||||
// check think function
|
// check think function
|
||||||
|
|
|
@ -496,6 +496,15 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) {
|
||||||
//Elder: spawn unique items.
|
//Elder: spawn unique items.
|
||||||
RQ3_StartUniqueItems();
|
RQ3_StartUniqueItems();
|
||||||
|
|
||||||
|
// Elder: force sv_floodprotect to 0 -- remove when we finish
|
||||||
|
// recoding the weapon command and any other commands that may
|
||||||
|
// need smashing :)
|
||||||
|
if ( trap_Cvar_VariableIntegerValue( "sv_floodprotect" ) != 0 )
|
||||||
|
{
|
||||||
|
trap_Cvar_Set( "sv_floodprotect", "0" );
|
||||||
|
G_Printf("sv_floodprotect shut off for RQ3 Beta 1.\n");
|
||||||
|
}
|
||||||
|
|
||||||
SaveRegisteredItems();
|
SaveRegisteredItems();
|
||||||
|
|
||||||
G_Printf ("-----------------------------------\n");
|
G_Printf ("-----------------------------------\n");
|
||||||
|
|
Loading…
Reference in a new issue