Skip to content
Browse files

CreateCreatureCore: also set LastMarked

fixes iwd2 goblin worg riders killing their targets when they force dismount
  • Loading branch information...
1 parent bd1600b commit bb90878959b4dee646aa64cff5047c0fe8ac5b1b @lynxlynxlynx lynxlynxlynx committed Apr 29, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 gemrb/core/GameScript/GSUtils.cpp
View
6 gemrb/core/GameScript/GSUtils.cpp
@@ -747,6 +747,12 @@ void CreateCreatureCore(Scriptable* Sender, Action* parameters, int flags)
ab->SetPosition( pnt, flags&CC_CHECK_IMPASSABLE, radius/16, radius/12 );
ab->SetOrientation(parameters->int0Parameter, false );
+ // also set it as Sender's LastMarkedObject (fixes worg rider dismount killing players)
+ if (Sender->Type == ST_ACTOR) {
+ Actor *actor = (Actor *) Sender;
+ actor->LastMarked = ab->GetGlobalID();
+ }
+
//if string1 is animation, then we can't use it for a DV too
if (flags & CC_PLAY_ANIM) {
CreateVisualEffectCore( ab, ab->Pos, parameters->string1Parameter, 1);

0 comments on commit bb90878

Please sign in to comment.
Something went wrong with that request. Please try again.