!(Coding && Hangover)

This commit is contained in:
James Brown 2003-08-17 08:30:18 +00:00
parent 4d94385c2e
commit c31676d9a3
2 changed files with 5 additions and 15 deletions

View File

@ -460,8 +460,7 @@ static void IsActorInSector(void) {
const char *name = luaL_check_string(2);
int i, numSectors = Engine::instance()->currScene()->getSectorCount();
warning("IsActorInSector(%s, %s): STUB", act->name(), name);
printf("Looping over %d sectors\n", numSectors);
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)) {

17
scene.h
View File

@ -53,22 +53,13 @@ public:
int setup() const { return currSetup_ - setups_; }
// Sector access functions
#define validSector(id) ((numSectors_ >= 0) && (id < numSectors_))
int getSectorCount() { return numSectors_; }
const char *getSectorName(int id) const {
// FIXME: Will someone explain to me why my machine thinks 0 > 11?!?
if (id > numSectors_) {
return sectors_[id].name_.c_str();
} else {
printf("Sector %d > %d\n", id, numSectors_);
return NULL;
}
}
int getSectorType(int id) {
if (id > numSectors_) return sectors_[id].type_; else return -1;
}
int getSectorID(int id) {
if (id > numSectors_) return sectors_[id].id_; else return -1;
if (validSector(id)) return sectors_[id].name_.c_str(); else return NULL;
}
int getSectorType(int id) { if (validSector(id)) return sectors_[id].type_; else return -1; }
int getSectorID(int id) { if (validSector(id)) return sectors_[id].id_; else return -1; }
bool isPointInSector(int id, Vector3d point) { return false; } // FIXME: Need pointInPoly func
private: