Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SEARCH IN P2PMessages.h FOR
- PKT_S2C_GroupNotify
- Below add this
- PKT_S2C_CreateBuilding,
- SEARCH FOR
- struct PKT_S2C_RepairItemAns_s : public DefaultPacketMixin<PKT_S2C_RepairItemAns>
- Add below that
- struct PKT_S2C_CreateBuilding_s : public DefaultPacketMixin<PKT_S2C_CreateBuilding>
- {
- gp2pnetid_t spawnID;
- char fname[512];
- r3dPoint3D pos;
- r3dVector angle;
- bool col;
- };
- SEARCH FOR
- struct PKT_C2S_StartGameReq_s : public DefaultPacketMixin<PKT_C2S_StartGameReq>
- Add into the function below "__int64 uniqueID; // HWID for FF"
- bool FastLoad;
- ClientGameLogic.h
- SEARCH FOR
- float nextTimeToSendCameraPos;
- Add this after one space
- float lastBuilding;
- SEARCH FOR THIS
- DEFINE_PACKET_FUNC(PKT_S2C_CreateNetObject);
- Below that add this
- DEFINE_PACKET_FUNC(PKT_S2C_CreateBuilding);
- ClientGameLogic.cpp
- SEARCH FOR
- int ClientGameLogic::RequestToStartGame()
- Below this
- n.uniqueID = g_HardwareInfo.uniqueId;
- Add this
- n.FastLoad = g_FastLoad->GetBool();
- Below this function
- IMPL_PACKET_FUNC(ClientGameLogic, PKT_S2C_UpdateGearData)
- Add this entery one
- void CreateBuildingThread(/*const PKT_S2C_CreateBuilding_s& n*/)
- {
- r3dPoint3D bpos1;
- r3dVector bangle1;
- char bfname1[1024] = {0};
- bool bcol1;
- bpos1 = bpos;
- bangle1 = bangle;
- bcol1 = bcol;
- sprintf(bfname1,"%s",bfname);
- //Sleep( random(50) ); // Krit
- const ClientGameLogic& CGL = gClientLogic();
- if (r3dGetTime() > CGL.lastBuilding + 0.5f)
- {
- gClientLogic().lastBuilding = r3dGetTime();
- obj_Building* Building = (obj_Building*)srv_CreateGameObject("obj_Building", bfname1, bpos1);
- Building->NetworkLocal = false;
- // Building->SetNetworkID(buildpkt->spawnID);
- Building->SetRotationVector(bangle1);
- if (bcol1)
- {
- Building->setSkipOcclusionCheck( true );
- Building->ObjFlags |= OBJFLAG_PlayerCollisionOnly;
- }
- return; // exitthread
- }
- }
- IMPL_PACKET_FUNC(ClientGameLogic, PKT_S2C_CreateBuilding)
- {
- if (!g_FastLoad->GetBool()) return; // if disabled fastload. ignore this packet from server.
- r3dOutToLog("CreateBuilding %s\n",n.fname);
- /*const char* fname = n.fname;
- //fname += 4;
- std::string str= fname;
- unsigned pos = str.find(".");
- std::string str2 = str.substr(0,pos);
- //r3dOutToLog("fName %s\n",fname);
- char fname1[512] = {0};
- r3dscpy(fname1,str2.c_str());
- sprintf(fname1,"%s_playeronly.scb",fname1);
- //r3dOutToLog("fNamePO %s\n",fname1);
- if(r3dFileExists(fname1))
- {
- //r3dOutToLog("PlayerOnly Found! %s\n",fname1);
- obj_Building* Building = (obj_Building*)srv_CreateGameObject("obj_Building", fname1, n.pos);
- Building->NetworkLocal = false;
- Building->SetNetworkID(n.spawnID);
- Building->SetRotationVector(n.angle);
- if (n.col)
- {
- Building->setSkipOcclusionCheck( true );
- Building->ObjFlags |= OBJFLAG_PlayerCollisionOnly;
- }
- }
- else
- {*/
- //lastBuilding = r3dGetTime();
- //Sleep( random(5) ); // Krit
- obj_Building* Building = (obj_Building*)srv_CreateGameObject("obj_Building", n.fname, n.pos);
- Building->NetworkLocal = true;
- //Building->SetNetworkID(n.spawnID);
- Building->SetRotationVector(n.angle);
- if (n.col)
- {
- Building->setSkipOcclusionCheck( true );
- Building->ObjFlags |= OBJFLAG_PlayerCollisionOnly;
- }
- //Sleep(1);
- Building->OnCreate();
- //}
- //buildpkt = n;
- //bpos = n.pos;
- //bangle = n.angle;
- //bcol = n.col;
- //sprintf(bfname,"%s",n.fname);
- //CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)CreateBuildingThread,NULL,0,0);
- }
- SEARCH FOR TIS
- DEFINE_PACKET_HANDLER(PKT_S2C_DestroyNetObject);
- Below that paste this
- EFINE_PACKET_HANDLER(PKT_S2C_CreateBuilding);
- Now Search for
- bool ClientGameLogic::wait_GameStart()
- scroll down and after this
- n.lastNetID = net_lastFreeId;
- add this
- n.FastLoad = g_FastLoad->GetBool();
- Now goto the top and below this
- extern int g_RenderScopeEffect;
- add this
- static r3dPoint3D bpos;
- static r3dVector bangle;
- char bfname[1024] = {0};
- static bool bcol;
- GameLevel_OI.cpp
- SEARCH FOR THIS
- GameObject * LoadLevelObject ( pugi::xml_node & curNode )
- AFTER the #endif Add this
- #ifdef FINAL_BUILD
- //r3dOutToLog("HomeDir %s"
- if (strcmp( r3dGameLevel::GetHomeDir() , "Levels\\WZ_FrontEndLighting") && g_FastLoad->GetBool())
- {
- if(!strcmp( class_name, "obj_StoreNPC" ) || !strcmp( class_name, "obj_VaultNPC" ) || !strcmp( class_name, "obj_Terrain" ) || !strcmp( class_name, "obj_PermanentNote" ) || !strcmp( class_name, "obj_WaterPlane" ) || !strcmp( class_name, "obj_Lake" ) || !strcmp( class_name, "obj_Road" ) || !strcmp( class_name, "obj_ParticleSystem" ) || !strcmp( class_name, "obj_LightMesh" ) || !strcmp( class_name, "obj_LightHelper" ) || !strcmp( class_name, "obj_AmbientSound" )) /*|| (GameWorld().objplrLoad - pos).Length() < 1000 /*Load only object near player around 1000m) // we need to force load terrain , water*/
- {
- //r3dOutToLog("Terrain Found. , Loading..\n");
- obj = srv_CreateGameObject(class_name, load_name, pos);
- if(!obj)
- {
- r3dOutToLog("!!!Failed to create object! class: %s, name: %s\n", class_name, load_name);
- return NULL;
- }
- r3d_assert ( obj );
- obj->ReadSerializedData(curNode);
- return obj;
- }
- }
- else
- {
- obj = srv_CreateGameObject(class_name, load_name, pos);
- if(!obj)
- {
- r3dOutToLog("!!!Failed to create object! class: %s, name: %s\n", class_name, load_name);
- return NULL;
- }
- r3d_assert ( obj );
- obj->ReadSerializedData(curNode);
- return obj;
- }
- // fill building data.
- /*if ( !strcmp( class_name, "obj_Building" ))
- {
- //ObjectManager& GW = GameWorld();
- ObjectManager::BuildingListData_s& build = GameWorld().BuildingListData[GameWorld().numbuilding++];
- build.pos = pos;
- //GW.BuildingListData[num].Angle =;
- sprintf(build.fname,load_name);
- //GW.BuildingListData[num].Node = curNode;
- build.isVisible = false;
- build.obj = NULL;
- return NULL;
- }*/
- #endif
- HUDPause.cpp
- SEARCH FOR THIS
- var[29].SetNumber( r_vsync_enabled->GetInt()+1);
- Add this below
- var[28].SetNumber(g_FastLoad->GetInt());
- change the var[30] to var[31]
- Scaleform::GFx::Value var[31];
- Change the this var to 31 too
- gfxMovie.Invoke("_root.api.setOptions", var, 31);
- FrontEndWarZ.cpp
- Search for
- var[29].SetNumber( r_vsync_enabled->GetInt()+1);
- Add this below
- var[30].SetNumber( g_FastLoad->GetInt()); // FastLoad
- Change the var from 30 to 31 like this
- Scaleform::GFx::Value var[31];
- also in this case below
- gfxMovie.Invoke("_root.api.setOptions", var, 31);
- Vars.h
- SEARCH FOR
- REG_VAR( g_serverip, "25.168.34.172", 0 );
- Add this above
- REG_VAR( g_FastLoad, true, VF_SAVE );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement