Person::players.back()->power = Person::players[0]->power;
Person::players.back()->speedmult = Person::players[0]->speedmult;
+ if (Input::isKeyDown(SDL_SCANCODE_RSHIFT))
+ Person::players.back()->isplayerfriend = true;
+
Person::players.back()->loaded = true;
}
victim(nullptr)
, hasvictim(false)
+ , isplayerfriend(false)
,
updatedelay(0)
void Person::doAI()
{
- if (!isPlayerControlled() && !Dialog::inDialog()) {
+ if (!isPlayerControlled() && !isPlayerFriend() && !Dialog::inDialog()) {
jumpclimb = 0;
//disable movement in editor
if (Game::editorenabled) {
std::shared_ptr<Person> victim;
bool hasvictim;
+ bool isplayerfriend;
float updatedelay;
float normalsupdatedelay;
bool hasWeapon() { return (weaponactive != -1); }
bool isPlayerControlled() { return (aitype == playercontrolled); }
+ bool isPlayerFriend() { return isplayerfriend; }
};
const int maxplayers = 10;