mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-12 16:21:04 +02:00
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
#include "precompiled.h"
|
|
#pragma hdrstop
|
|
|
|
#include "prey_local.h"
|
|
|
|
/***********************************************************************
|
|
|
|
hhWeaponCrawlerGrenade
|
|
|
|
***********************************************************************/
|
|
const idEventDef EV_SpawnBloodSpray( "spawnBloodSpray" );
|
|
|
|
CLASS_DECLARATION( hhWeapon, hhWeaponCrawlerGrenade )
|
|
EVENT( EV_SpawnBloodSpray, hhWeaponCrawlerGrenade::Event_SpawnBloodSpray )
|
|
END_CLASS
|
|
|
|
/*
|
|
=================
|
|
hhWeaponCrawlerGrenade::WriteToSnapshot
|
|
=================
|
|
*/
|
|
void hhWeaponCrawlerGrenade::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|
hhWeapon::WriteToSnapshot(msg);
|
|
msg.WriteBits(WEAPON_ALTMODE, 1);
|
|
}
|
|
|
|
/*
|
|
=================
|
|
hhWeaponCrawlerGrenade::ReadFromSnapshot
|
|
=================
|
|
*/
|
|
void hhWeaponCrawlerGrenade::ReadFromSnapshot( const idBitMsgDelta &msg ) {
|
|
hhWeapon::ReadFromSnapshot(msg);
|
|
WEAPON_ALTMODE = !!msg.ReadBits(1);
|
|
}
|
|
|
|
/*
|
|
=================
|
|
hhWeaponCrawlerGrenade::Event_SpawnBloodSpray
|
|
=================
|
|
*/
|
|
void hhWeaponCrawlerGrenade::Event_SpawnBloodSpray() {
|
|
hhFxInfo fxInfo;
|
|
fxInfo.UseWeaponDepthHack( true );
|
|
if (WEAPON_ALTMODE) {
|
|
BroadcastFxInfoAlongBonePrefix( dict, "fx_blood", "joint_AltBloodFx", &fxInfo );
|
|
}
|
|
else {
|
|
BroadcastFxInfoAlongBonePrefix( dict, "fx_blood", "joint_bloodFx", &fxInfo );
|
|
}
|
|
} |