Skip to content

Commit 5630686

Browse files
authored
Merge pull request #45 from SalatielSauer/main
Fix crash when using vslot/remip commands in multiplayer & support old mapmodel command
2 parents aef1e1e + b8d351d commit 5630686

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/engine/rendermodel.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,11 @@ void mapmodel(char *name)
335335
mmi.m = mmi.collide = NULL;
336336
}
337337

338+
void mapmodelcompat(int* rad, int* h, int* tex, char* name, char* shadow)
339+
{
340+
mapmodel(name);
341+
}
342+
338343
void mapmodelreset(int *n)
339344
{
340345
if(!(identflags&IDF_OVERRIDDEN) && !game::allowedittoggle()) return;
@@ -344,7 +349,7 @@ void mapmodelreset(int *n)
344349
const char *mapmodelname(int i) { return mapmodels.inrange(i) ? mapmodels[i].name : NULL; }
345350

346351
ICOMMAND(mmodel, "s", (char *name), mapmodel(name));
347-
COMMAND(mapmodel, "s");
352+
COMMANDN(mapmodel, mapmodelcompat, "iiiss");
348353
COMMAND(mapmodelreset, "i");
349354
ICOMMAND(mapmodelname, "ii", (int *index, int *prefix), { if(mapmodels.inrange(*index)) result(mapmodels[*index].name[0] ? mapmodels[*index].name + (*prefix ? 0 : mmprefixlen) : ""); });
350355
ICOMMAND(mapmodelloaded, "i", (int *index), { intret(mapmodels.inrange(*index) && mapmodels[*index].m ? 1 : 0); });

src/shared/iengine.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern bool settexture(const char *name, int clamp = 0);
5656

5757
// octaedit
5858

59-
enum { EDIT_FACE = 0, EDIT_TEX, EDIT_MAT, EDIT_FLIP, EDIT_COPY, EDIT_PASTE, EDIT_ROTATE, EDIT_REPLACE, EDIT_DELCUBE, EDIT_CALCLIGHT, EDIT_REMIP, EDIT_VSLOT, EDIT_UNDO, EDIT_REDO };
59+
enum { EDIT_FACE = 0, EDIT_TEX, EDIT_MAT, EDIT_FLIP, EDIT_COPY, EDIT_PASTE, EDIT_ROTATE, EDIT_REPLACE, EDIT_DELCUBE, EDIT_REMIP, EDIT_VSLOT, EDIT_UNDO, EDIT_REDO, EDIT_CALCLIGHT};
6060

6161
struct selinfo
6262
{

0 commit comments

Comments
 (0)