r68 - in trunk/src: . objects
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Oct 2 18:41:31 EDT 2004
Author: jonas
Date: 2004-10-02 18:41:31 -0400 (Sat, 02 Oct 2004)
New Revision: 68
Modified:
trunk/src/characters_common.h
trunk/src/objects/fang.cpp
trunk/src/objects/olaf.cpp
trunk/src/objects/scorch.cpp
Log:
fixed the misbehaviour of olaf, scorch and fang (this should have been changed with the commit of the fall function)
Modified: trunk/src/characters_common.h
===================================================================
--- trunk/src/characters_common.h 2004-10-02 22:24:32 UTC (rev 67)
+++ trunk/src/characters_common.h 2004-10-02 22:41:31 UTC (rev 68)
@@ -107,6 +107,8 @@
}
//Define these for each character, the base function must be run for all derived classes
virtual void idle(Uint16);
+ /// Calculates the speed of the character
+ /// \todo clean up this mess with fall/move
virtual void fall(Uint16);
//when it dies...
virtual void die();
@@ -149,7 +151,8 @@
//@}
//crash into another object (default: ground)
virtual void crash(Uint16 dir=DIR_DOWN);
- //move
+ /// Updates the position of the character depending on it's velocity, checks for crashes
+ /// \todo clean up this mess with move and fall
virtual Hit move(Uint16 dt, bool check=false);
Uint8 health;
Uint8 maxhealth;
Modified: trunk/src/objects/fang.cpp
===================================================================
--- trunk/src/objects/fang.cpp 2004-10-02 22:24:32 UTC (rev 67)
+++ trunk/src/objects/fang.cpp 2004-10-02 22:41:31 UTC (rev 68)
@@ -55,7 +55,7 @@
if (!(hit.touch&DIR_LEFT)) unsetState(STATE_CLIMB_L);
if (!(hit.touch&DIR_RIGHT)) unsetState(STATE_CLIMB_R);
}
- if ((hit.enter&DIR_DOWN || hit.touch&DIR_DOWN) && (state&STATE_FALL)) crash(DIR_DOWN);
+ if ((hit.enter&DIR_DOWN) && (state&STATE_FALL)) crash(DIR_DOWN);
Dgrav=0;
}
}
Modified: trunk/src/objects/olaf.cpp
===================================================================
--- trunk/src/objects/olaf.cpp 2004-10-02 22:24:32 UTC (rev 67)
+++ trunk/src/objects/olaf.cpp 2004-10-02 22:41:31 UTC (rev 68)
@@ -167,7 +167,7 @@
if ((state&STATE_SHIELD) && (speed > V_SHIELD)) setSpeed(V_SHIELD);
}
Hit hit=move(Dgrav);
- if ((hit.enter&DIR_DOWN || hit.touch&DIR_DOWN) && (state&STATE_FALL)) crash(DIR_DOWN);
+ if ((hit.enter&DIR_DOWN) && (state&STATE_FALL)) crash(DIR_DOWN);
Dgrav=0;
}
}
Modified: trunk/src/objects/scorch.cpp
===================================================================
--- trunk/src/objects/scorch.cpp 2004-10-02 22:24:32 UTC (rev 67)
+++ trunk/src/objects/scorch.cpp 2004-10-02 22:41:31 UTC (rev 68)
@@ -36,7 +36,7 @@
if ((state&STATE_GLIDE) && (speed > V_GLIDE)) speed=V_GLIDE;;
}
Hit hit=move(Dgrav);
- if ((hit.enter&DIR_DOWN || hit.touch&DIR_DOWN) && (state&STATE_FALL)) crash(DIR_DOWN);
+ if ((hit.enter&DIR_DOWN) && (state&STATE_FALL)) crash(DIR_DOWN);
Dgrav=0;
}
}
More information about the lostpenguins-commits
mailing list