Make execute() take an OFString
FossilOrigin-Name: acc50da079501c3c301f3a742f14cdfe7ac4b6fd56a6ee46acb32cfbaa059dcf
This commit is contained in:
parent
039efe612d
commit
e4c1890a25
8 changed files with 79 additions and 108 deletions
10
src/world.mm
10
src/world.mm
|
@ -2,8 +2,6 @@
|
|||
|
||||
#include "cube.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
extern OFString *entnames[]; // lookup from map entities above to strings
|
||||
|
||||
sqr *world = NULL;
|
||||
|
@ -70,10 +68,8 @@ trigger(int tag, int type, bool savegame)
|
|||
OFString *aliasname =
|
||||
[OFString stringWithFormat:@"level_trigger_%d", tag];
|
||||
|
||||
if (identexists(aliasname)) {
|
||||
std::unique_ptr<char> cmd(strdup(aliasname.UTF8String));
|
||||
execute(cmd.get());
|
||||
}
|
||||
if (identexists(aliasname))
|
||||
execute(aliasname);
|
||||
}
|
||||
|
||||
if (type == 2)
|
||||
|
@ -502,7 +498,7 @@ empty_world(
|
|||
if (oldworld) {
|
||||
free(oldworld);
|
||||
toggleedit();
|
||||
execute("fullbright 1");
|
||||
execute(@"fullbright 1");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue