From: Laszlo T. <ave...@us...> - 2005-04-10 18:49:41
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29038 Modified Files: ActorBlock.cpp Log Message: ActorBlock:implemented selected group movement Index: ActorBlock.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/ActorBlock.cpp,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** ActorBlock.cpp 9 Apr 2005 19:13:39 -0000 1.83 --- ActorBlock.cpp 10 Apr 2005 18:49:08 -0000 1.84 *************** *** 27,36 **** /*********************** ! * Scriptable Class * ***********************/ Scriptable::Scriptable(ScriptableType type) { Type = type; - MySelf = NULL; CutSceneId = NULL; for (int i = 0; i < MAX_SCRIPTS; i++) { --- 27,35 ---- /*********************** ! * Scriptable Class * ***********************/ Scriptable::Scriptable(ScriptableType type) { Type = type; CutSceneId = NULL; for (int i = 0; i < MAX_SCRIPTS; i++) { *************** *** 105,119 **** } Scripts[idx] = 0; ! if (aScript[0]) { Scripts[idx] = new GameScript( aScript, Type, locals ); Scripts[idx]->MySelf = this; } } ! /* ! void Scriptable::SetMySelf(Scriptable* MySelf) ! { ! this->MySelf = MySelf; ! } ! */ void Scriptable::SetScript(int index, GameScript* script) { --- 104,115 ---- } Scripts[idx] = 0; ! // NONE is an 'invalid' script name, never used seriously ! // This hack is to prevent flooding of the console ! if (aScript[0] && stricmp(aScript, "NONE") ) { Scripts[idx] = new GameScript( aScript, Type, locals ); Scripts[idx]->MySelf = this; } } ! void Scriptable::SetScript(int index, GameScript* script) { *************** *** 219,223 **** playDeadCounter--; if (!playDeadCounter) { - //Moveble* mov = ( Moveble* ) MySelf; Moveble* mov = ( Moveble* ) this; mov->SetStance( IE_ANI_GET_UP ); --- 215,218 ---- *************** *** 656,660 **** bool Door::IsOpen() const { ! return (Flags&DOOR_OPEN) == !core->HasFeature(GF_REVERSE_DOOR); } --- 651,655 ---- bool Door::IsOpen() const { ! return (Flags&DOOR_OPEN) == !core->HasFeature(GF_REVERSE_DOOR); } *************** *** 723,731 **** if (!actor->InParty && (Flags&TRAVEL_NONPC) ) return CT_CANTMOVE; if (Flags&TRAVEL_PARTY) { ! if (core->HasFeature(GF_TEAM_MOVEMENT) || core->GetGame()->EveryoneNearPoint(actor->Area, actor->Pos, true) ) { return CT_WHOLE; } return CT_GO_CLOSER; } return CT_ACTIVE; } --- 718,734 ---- if (!actor->InParty && (Flags&TRAVEL_NONPC) ) return CT_CANTMOVE; if (Flags&TRAVEL_PARTY) { ! if (core->HasFeature(GF_TEAM_MOVEMENT) || core->GetGame()->EveryoneNearPoint(actor->Area, actor->Pos, ENP_CANMOVE) ) { return CT_WHOLE; } return CT_GO_CLOSER; } + if(actor->IsSelected() ) + { + if(core->GetGame()->EveryoneNearPoint(actor->Area, actor->Pos, ENP_CANMOVE|ENP_ONLYSELECT) ) + { + return CT_MOVE_SELECTED; + } + return CT_SELECTED; + } return CT_ACTIVE; } |