Use the same item index for server and client
TrackObjectPresentationSound will create item trigger, when network split screen is used it will be diverged.
This commit is contained in:
parent
8950354e62
commit
dd9bb640d1
@ -167,9 +167,11 @@ void TrackObject::init(const XMLNode &xml_node, scene::ISceneNode* parent,
|
|||||||
else if (type == "sfx-emitter")
|
else if (type == "sfx-emitter")
|
||||||
{
|
{
|
||||||
// FIXME: at this time sound emitters are just disabled in multiplayer
|
// FIXME: at this time sound emitters are just disabled in multiplayer
|
||||||
// otherwise the sounds would be constantly heard
|
// otherwise the sounds would be constantly heard, for networking
|
||||||
if (race_manager->getNumLocalPlayers() < 2)
|
// the index of item needs to be same so we create and disable it
|
||||||
m_presentation = new TrackObjectPresentationSound(xml_node, parent);
|
m_presentation = new TrackObjectPresentationSound(xml_node, parent);
|
||||||
|
if (race_manager->getNumLocalPlayers() < 2)
|
||||||
|
m_presentation->setEnable(false);
|
||||||
}
|
}
|
||||||
else if (type == "action-trigger")
|
else if (type == "action-trigger")
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user