Initial Prey Game integration support.

This commit is contained in:
Justin Marshall
2026-05-05 15:01:01 -07:00
parent a6c6f1ed26
commit 8d5f678b25
552 changed files with 265551 additions and 209 deletions
@@ -0,0 +1,51 @@
#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 );
}
}