MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / SwitchState

Method SwitchState

ogsr_engine/xrGame/HudItem.cpp:213–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211bool CHudItem::Action(s32 cmd, u32 flags) { return false; }
212
213void CHudItem::SwitchState(u32 S)
214{
215 SetNextState(S); // Very-very important line of code!!! :)
216
217 if (object().Local() && !object().getDestroy())
218 {
219 // !!! Just single entry for given state !!!
220 NET_Packet P;
221 object().u_EventGen(P, GE_WPN_STATE_CHANGE, object().ID());
222 P.w_u8(u8(S));
223 object().u_EventSend(P);
224 }
225}
226
227void CHudItem::OnEvent(NET_Packet& P, u16 type)
228{

Callers

nothing calls this directly

Calls 4

objectFunction · 0.50
u_EventGenMethod · 0.45
w_u8Method · 0.45
u_EventSendMethod · 0.45

Tested by

no test coverage detected