aboutsummaryrefslogtreecommitdiff
path: root/bobthebob.testing/scripts/vscripts/sh_bleedout_test.gnut
blob: 42727adc41f29b0798ebc1845e62f652e2b47f4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
global function BleedoutTest_Init

void function BleedoutTest_Init()
{
	return // not in use rn

	AddCallback_OnRegisteringCustomNetworkVars( RegisterBleedoutVars )
	
	BleedoutShared_Init( 30.0, 3.0, -1.0, 1.0, 0.0, false, false )
	
	#if SERVER
		Bleedout_Init()
		if ( ReviveEnabled() )
			AddCallback_OnPlayerKilled( StartRevive )
	#elseif CLIENT
		BleedoutClient_Init()
	#endif
}

#if SERVER 
void function StartRevive( entity victim, entity attacker, var damageInfo )
{
	DeathPackage_PlayerRevive( victim )
	thread PlayerRevivesOrBleedsOut( victim )
}
#endif

void function RegisterBleedoutVars()
{
	Remote_RegisterFunction( "ServerCallback_BLEEDOUT_StartFirstAidProgressBar" )
	Remote_RegisterFunction( "ServerCallback_BLEEDOUT_StopFirstAidProgressBar" )
	Remote_RegisterFunction( "ServerCallback_BLEEDOUT_ShowWoundedMarker" )
    Remote_RegisterFunction( "ServerCallback_BLEEDOUT_HideWoundedMarker" )
}