MCPcopy Create free account
hub / github.com/ZDoom/Raze / changeMap

Function changeMap

source/core/cheats.cpp:219–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217//---------------------------------------------------------------------------
218
219void changeMap(int player, uint8_t** stream, bool skip)
220{
221 int skill = (int8_t)ReadByte(stream);
222 int bossexit = (int8_t)ReadByte(stream);
223 auto mapname = ReadStringConst(stream);
224 if (skip) return;
225 auto map = FindMapByName(mapname);
226 if (map || *mapname == 0) // mapname = "" signals end of episode
227 {
228 gameaction = ga_completed;
229 g_nextmap = map;
230 g_nextskill = skill;
231 g_bossexit = bossexit;
232 }
233}
234
235//---------------------------------------------------------------------------
236//

Callers

nothing calls this directly

Calls 3

ReadStringConstFunction · 0.85
FindMapByNameFunction · 0.85
ReadByteFunction · 0.70

Tested by

no test coverage detected