Browse files

implement MultiPlayerSync

This is mainly to fix cutscenes of the form:


Since the map hasn't changed yet when MoveViewPoint is reached,
the command fails (or gets overwritten later on when the map does
change). As a result the player is often left looking at the party
which isn't even supposed to be present in the scene while sounds
imply interesting things going on in other parts of the area.

Adding a wait in place of the MultiPlayerSync command makes sure
that the area changes before trying to set the new view point.
  • Loading branch information...
1 parent b5bc53d commit 0d084a41faacec2dfeab77fcd5756ec508cc30d6 @fizzet fizzet committed Jun 9, 2013
@@ -7145,4 +7145,9 @@ void GameScript::ChunkCreature(Scriptable *Sender, Action* parameters)
delete fx;
+void GameScript::MultiPlayerSync(Scriptable* Sender, Action* /*parameters*/)
+ Sender->SetWait(1);
@@ -714,6 +714,7 @@ static const ActionLink actionnames[] = {
{"moveviewobject", GameScript::MoveViewObject, AF_BLOCKING},
{"moveviewpoint", GameScript::MoveViewPoint, AF_BLOCKING},
{"moveviewpointuntildone", GameScript::MoveViewPoint, 0},
+ {"multiplayersync", GameScript::MultiPlayerSync, 0},
{"nidspecial1", GameScript::NIDSpecial1,AF_BLOCKING|AF_DIRECT|AF_ALIVE},//we use this for dialogs, hack
{"nidspecial2", GameScript::NIDSpecial2,AF_BLOCKING},//we use this for worldmap, another hack
{"nidspecial3", GameScript::Attack,AF_BLOCKING|AF_DIRECT|AF_ALIVE},//this hack is for attacking preset target
@@ -1191,6 +1191,7 @@ class GEM_EXPORT GameScript {
static void MoveToSavedLocation(Scriptable* Sender, Action* parameters);
static void MoveViewPoint(Scriptable* Sender, Action* parameters);
static void MoveViewObject(Scriptable* Sender, Action* parameters);
+ static void MultiPlayerSync(Scriptable* Sender, Action* parameters);
static void NIDSpecial1(Scriptable* Sender, Action* parameters);
static void NIDSpecial2(Scriptable* Sender, Action* parameters);
static void NoAction(Scriptable* Sender, Action* parameters);

0 comments on commit 0d084a4

Please sign in to comment.