MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SetName

Method SetName

Descent3/levelgoal.cpp:286–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286bool lgoal::SetName(int handle, char *name) {
287 if (!name)
288 return false;
289
290 if (m_name)
291 mem_free(m_name);
292
293 m_name = (char *)mem_malloc(strlen(name) + 1);
294 strcpy(m_name, name);
295 m_modified = 1;
296
297 if (Game_mode & GM_MULTI && Netgame.local_role != LR_CLIENT) {
298 // send it off to the clients
299 SendMultiUpdate(handle);
300 }
301
302 return true;
303}
304
305void lgoal::SendMultiUpdate(int handle) {
306 ASSERT(Game_mode & GM_MULTI && Netgame.local_role == LR_SERVER);

Callers 1

GoalSetNameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected