void Game::playdialoguescenesound()
{
XYZ temppos;
- temppos = Person::players[Dialog::currentScene().participantfocus]->coords;
+ temppos = Person::players.at(Dialog::currentScene().participantfocus)->coords;
temppos = temppos - viewer;
Normalise(&temppos);
temppos += viewer;
hostile = 1;
}
- if (Person::players[Dialog::currentScene().participantfocus]->dead) {
+ if (Person::players.at(Dialog::currentScene().participantfocus)->dead) {
Dialog::indialogue = -1;
Dialog::directing = false;
cameramode = 0;
{
for (unsigned i = 0; i < scenes.size(); i++) {
int playerId = scenes[i].participantfocus;
- Person::players[playerId]->coords = participantlocation[playerId];
+ Person::players.at(playerId)->coords = participantlocation[playerId];
Person::players[playerId]->yaw = participantyaw[playerId];
Person::players[playerId]->targetyaw = participantyaw[playerId];
Person::players[playerId]->velocity = 0;
{
if (Dialog::inDialog() && (howactive == typeactive) && (creature == rabbittype))
return talkidleanim;
- if (hasvictim && (victim != this->shared_from_this())/*||(id==0&&attackkeydown)*/)
- if (/*(id==0&&attackkeydown)||*/(!victim->dead && victim->aitype != passivetype &&
+ if (hasvictim && (victim != this->shared_from_this())) {
+ if ((!victim->dead && victim->aitype != passivetype &&
victim->aitype != searchtype && aitype != passivetype && aitype != searchtype &&
victim->id < Person::players.size())) {
if ((aitype == playercontrolled && stunned <= 0 && weaponactive == -1) || pause) {
if (aitype != playercontrolled && stunned <= 0 && creature != wolftype && !pause)
return fightsidestep;
}
+ }
if ((damage > permanentdamage || damage > damagetolerance * .8 || deathbleeding > 0) && creature != wolftype)
return hurtidleanim;
if (howactive == typesitting) return sitanim;