mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-09-27 10:30:06 +00:00
added better drop handling, parsing, rng
This commit is contained in:

committed by
Gent Semaj

parent
aa028392f0
commit
78b17aea72
@@ -4,6 +4,7 @@
|
||||
#include "Items.hpp"
|
||||
#include "Missions.hpp"
|
||||
#include "Nanos.hpp"
|
||||
#include "Rand.hpp"
|
||||
|
||||
// helper function, not a packet handler
|
||||
void BuiltinCommands::setSpecialState(CNSocket* sock, CNPacketData* data) {
|
||||
@@ -271,8 +272,8 @@ static void teleportPlayer(CNSocket *sock, CNPacketData *data) {
|
||||
case eCN_GM_TeleportMapType__Unstick:
|
||||
targetPlr = PlayerManager::getPlayer(targetSock);
|
||||
|
||||
PlayerManager::sendPlayerTo(targetSock, targetPlr->x - unstickRange/2 + rand() % unstickRange,
|
||||
targetPlr->y - unstickRange/2 + rand() % unstickRange, targetPlr->z + 80);
|
||||
PlayerManager::sendPlayerTo(targetSock, targetPlr->x - unstickRange/2 + Rand::rand(unstickRange),
|
||||
targetPlr->y - unstickRange/2 + Rand::rand(unstickRange), targetPlr->z + 80);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user