1class TransferValues
extends Managed
52 if (
GetGame().IsClient() )
return;
98 float health_current =
m_Player.GetHealth(
"",
"Health");
112 float blood_current =
m_Player.GetHealth(
"",
"Blood");
115 blood_normalized =
Math.
Clamp(blood_normalized,0,1);
132 float health_current =
m_Player.GetHealth(
"",
"Health");
138 float blood_current =
m_Player.GetHealth(
"",
"Blood");
140 blood_normalized =
Math.
Clamp(blood_normalized,0,1);
177 #ifdef DIAG_DEVELOPER
proto native void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
static ref Param2< int, float > PARAM2_INT_FLOAT
void OnRPC(ParamsReadContext ctx)
const int BLOOD_THRESHOLD_LOW
void ShowDebugValues(bool show)
void ReceiveValue(int value_type, float value)
const float SENSITIVTY_PERCENTAGE
void SendValue(int value_type, float value)
const float VALUE_CHECK_INTERVAL
float m_TimeSinceLastTick
void OnScheduledTick(float deltatime)
void SendInitValues()
Sends values on object creation.
void TransferValues(PlayerBase player)
proto bool Read(void value_in)
Serializer ParamsReadContext
proto native CGame GetGame()
static proto native void End()
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)
static proto void BeginCleanupScope()
static proto native void EndCleanupScope()
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto float AbsFloat(float f)
Returns absolute value.