Move walkplane/sector code to seperate file
This commit is contained in:
parent
452c22287a
commit
0e355abcaf
6 changed files with 134 additions and 70 deletions
13
lua.cpp
13
lua.cpp
|
@ -462,13 +462,14 @@ static void IsActorInSector(void) {
|
|||
|
||||
warning("IsActorInSector(%s, %s): SEMI-STUB", act->name(), name);
|
||||
for (i=0; i<numSectors; i++) {
|
||||
const char *sector_name = Engine::instance()->currScene()->getSectorName(i);
|
||||
if (sector_name && strstr(sector_name, name)) {
|
||||
Sector *sector = Engine::instance()->currScene()->getSectorBase(i);
|
||||
|
||||
if (strstr(sector->name(), name)) {
|
||||
warning("found sector!");
|
||||
if (Engine::instance()->currScene()->isPointInSector(i, act->pos())) {
|
||||
lua_pushnumber(Engine::instance()->currScene()->getSectorID(i));
|
||||
lua_pushstring((char*)Engine::instance()->currScene()->getSectorName(i));
|
||||
lua_pushnumber(Engine::instance()->currScene()->getSectorType(i));
|
||||
if (sector->isPointInSector(act->pos())) {
|
||||
lua_pushnumber(sector->id());
|
||||
lua_pushstring((char*)sector->name());
|
||||
lua_pushnumber(sector->type());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue