Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2015, 5:37:15 PM (10 years ago)
Author:
landauf
Message:

callStaticNetworkFunction() and callMemberNetworkFunction() are now template functions instead of macros.
simplified function call interface: always pass five MultiType-references. Check if MultiType.null() evaluates to true to see if the argument was defined.
moved references to NetworkFunctionManager to NetworkFunctionIncludes.cc.
this also fixed a linker error in MSVC by including NetworkFunctionIncludes.h in a build-unit inside the network library.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/orxonox/infos/GametypeInfo.cc

    r10465 r10478  
    369369                this->changedReadyToSpawn(ready);
    370370            else
    371                 callMemberNetworkFunction(GametypeInfo, changedReadyToSpawn, this->getObjectID(), player->getClientID(), ready);
     371                callMemberNetworkFunction(&GametypeInfo::changedReadyToSpawn, this->getObjectID(), player->getClientID(), ready);
    372372        }
    373373    }
     
    388388                    this->changedSpawned(spawned);
    389389            else
    390                 callMemberNetworkFunction(GametypeInfo, changedSpawned, this->getObjectID(), player->getClientID(), spawned);
     390                callMemberNetworkFunction(&GametypeInfo::changedSpawned, this->getObjectID(), player->getClientID(), spawned);
    391391        }
    392392    }
     
    399399        if (GameMode::isMaster())
    400400        {
    401             callMemberNetworkFunction(GametypeInfo, dispatchAnnounceMessage, this->getObjectID(), NETWORK_PEER_ID_BROADCAST, message);
     401            callMemberNetworkFunction(&GametypeInfo::dispatchAnnounceMessage, this->getObjectID(), NETWORK_PEER_ID_BROADCAST, message);
    402402            this->dispatchAnnounceMessage(message);
    403403        }
     
    411411                this->dispatchAnnounceMessage(message);
    412412            else
    413                 callMemberNetworkFunction(GametypeInfo, dispatchAnnounceMessage, this->getObjectID(), clientID, message);
     413                callMemberNetworkFunction(&GametypeInfo::dispatchAnnounceMessage, this->getObjectID(), clientID, message);
    414414        }
    415415    }
     
    422422                this->dispatchKillMessage(message);
    423423            else
    424                 callMemberNetworkFunction(GametypeInfo, dispatchKillMessage, this->getObjectID(), clientID, message);
     424                callMemberNetworkFunction(&GametypeInfo::dispatchKillMessage, this->getObjectID(), clientID, message);
    425425        }
    426426    }
     
    433433                this->dispatchDeathMessage(message);
    434434            else
    435                 callMemberNetworkFunction(GametypeInfo, dispatchDeathMessage, this->getObjectID(), clientID, message);
     435                callMemberNetworkFunction(&GametypeInfo::dispatchDeathMessage, this->getObjectID(), clientID, message);
    436436        }
    437437    }
     
    444444                this->dispatchStaticMessage(message, colour);
    445445            else
    446                 callMemberNetworkFunction(GametypeInfo, dispatchStaticMessage, this->getObjectID(), clientID, message, colour);
     446                callMemberNetworkFunction(&GametypeInfo::dispatchStaticMessage, this->getObjectID(), clientID, message, colour);
    447447        }
    448448    }
     
    455455                this->dispatchFadingMessage(message);
    456456            else
    457                 callMemberNetworkFunction(GametypeInfo, dispatchFadingMessage, this->getObjectID(), clientID, message);
     457                callMemberNetworkFunction(&GametypeInfo::dispatchFadingMessage, this->getObjectID(), clientID, message);
    458458        }
    459459    }
Note: See TracChangeset for help on using the changeset viewer.