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

Method g_cl_Spawn

ogsr_engine/xrGame/Level_network_spawn.cpp:76–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74};
75
76void CLevel::g_cl_Spawn(LPCSTR name, u8 rp, u16 flags, Fvector pos)
77{
78 // Create
79 CSE_Abstract* E = F_entity_Create(name);
80 VERIFY(E);
81
82 // Fill
83 E->s_name = name;
84 E->set_name_replace("");
85 E->s_gameid = u8(GameID());
86 E->s_RP = rp;
87 E->ID = 0xffff;
88 E->ID_Parent = 0xffff;
89 E->ID_Phantom = 0xffff;
90 E->s_flags.assign(flags);
91 E->RespawnTime = 0;
92 E->o_Position = pos;
93
94 // Send
95 NET_Packet P;
96 E->Spawn_Write(P, TRUE);
97 Send(P, net_flags(TRUE));
98
99 // Destroy
100 F_entity_Destroy(E);
101}
102
103#ifdef DEBUG
104extern Flags32 psAI_Flags;

Callers 1

OnEventMethod · 0.80

Calls 6

F_entity_CreateFunction · 0.85
GameIDFunction · 0.85
net_flagsFunction · 0.85
F_entity_DestroyFunction · 0.85
Spawn_WriteMethod · 0.80
assignMethod · 0.45

Tested by

no test coverage detected