*
* USES:
* GameTick/doPlayerCollisions - spread fire between players
- * GameTick/doDebugKeys - press f to ignite
+ * GameTick/doDevKeys - press f to ignite
* Person::DoStuff - spread fire from lit campfires and bushes
*/
void Person::CatchFire()
velocity = 0;
victim->velocity = 0;
- if (aitype != playercontrolled)
+ if (aitype != playercontrolled) {
feint = 0;
- if (aitype != playercontrolled && Random() % 3 == 0 && escapednum < 2 && difficulty == 2)
- feint = 1;
- if (aitype != playercontrolled && Random() % 5 == 0 && escapednum < 2 && difficulty == 1)
- feint = 1;
- if (aitype != playercontrolled && Random() % 10 == 0 && escapednum < 2 && difficulty == 0)
- feint = 1;
+ if (escapednum < 2) {
+ int chances = ((difficulty == 2) ? 3 : ((difficulty == 1) ? 5 : 10));
+ if ((Random() % chances) == 0) {
+ feint = 1;
+ }
+ }
+ }
if (victim->id == 0 && Animation::animations[victim->animTarget].attack == reversal)
numreversals++;
oldrot = 0;
targetrot = 0;
}
+ if (frameCurrent >= Animation::animations[animCurrent].frames.size()) {
+ frameCurrent = Animation::animations[animCurrent].frames.size() - 1;
+ }
if (animCurrent != oldanimCurrent || animTarget != oldanimTarget || ((frameCurrent != oldframeCurrent || frameTarget != oldframeTarget) && !calcrot)) {
//Old rotates
for (int i = 0; i < skeleton.joints.size(); i++) {
}
}
}
- if (frameCurrent >= Animation::animations[animCurrent].frames.size()) {
- frameCurrent = Animation::animations[animCurrent].frames.size() - 1;
- }
oldanimCurrent = animCurrent;
oldanimTarget = animTarget;