summaryrefslogtreecommitdiff
path: root/gaunt01/src/trapdoor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gaunt01/src/trapdoor.cpp')
-rw-r--r--gaunt01/src/trapdoor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gaunt01/src/trapdoor.cpp b/gaunt01/src/trapdoor.cpp
index 5fc639f..6757a04 100644
--- a/gaunt01/src/trapdoor.cpp
+++ b/gaunt01/src/trapdoor.cpp
@@ -99,11 +99,13 @@ float trapdoor::getFalldist(){
bool trapdoor::checkUpdate(map<int,player>& players) {
map<int,player>::iterator it;
+ bool gotcha=false;
for (it=players.begin();it!=players.end();it++) {
if (it->second.active) {
ofVec3f p=it->second.getWorldPosition();
ofRectangle r=getInnerRect();
if (getInnerRect().inside(p.x,p.y)&&!it->second.isCaught) {
+ gotcha=true;
trigger();
it->second.caught();
printf("caught!\n");
@@ -130,11 +132,15 @@ bool trapdoor::checkUpdate(map<int,player>& players) {
opening=true;
}
}
+ /*
if (segTime>13) {
start();
return true;
}
else return false;
+ */
+
+ return gotcha;
}
void trapdoor::drawDebug() {
@@ -160,7 +166,7 @@ void trapdoor::draw() {
ofTranslate(ofVec3f(position.x,position.y,0));
ofPushMatrix();
ofRotate(90,-1,0,0);
- ofScale(.15,.15,.15);
+ ofScale(.175,.175,.175);
surround.draw();
ofPushMatrix();
ofTranslate(90,0,0);