@@ -5982,55 +5982,68 @@ bool CClientGame::IsGlitchEnabled(unsigned char ucGlitch)
59825982 return ucGlitch < NUM_GLITCHES && m_Glitches[ucGlitch];
59835983}
59845984
5985- bool CClientGame::SetWorldSpecialProperty (WorldSpecialProperty property, bool isEnabled)
5985+ bool CClientGame::SetWorldSpecialProperty (WorldSpecialProperty property, bool isEnabled) noexcept
59865986{
59875987 switch (property)
59885988 {
59895989 case WorldSpecialProperty::HOVERCARS:
59905990 case WorldSpecialProperty::AIRCARS:
59915991 case WorldSpecialProperty::EXTRABUNNY:
59925992 case WorldSpecialProperty::EXTRAJUMP:
5993- return g_pGame->SetCheatEnabled (EnumToString (property), isEnabled);
5993+ g_pGame->SetCheatEnabled (EnumToString (property), isEnabled);
5994+ break ;
59945995 case WorldSpecialProperty::RANDOMFOLIAGE:
59955996 g_pGame->SetRandomFoliageEnabled (isEnabled);
5996- return true ;
5997+ break ;
59975998 case WorldSpecialProperty::SNIPERMOON:
59985999 g_pGame->SetMoonEasterEggEnabled (isEnabled);
5999- return true ;
6000+ break ;
60006001 case WorldSpecialProperty::EXTRAAIRRESISTANCE:
60016002 g_pGame->SetExtraAirResistanceEnabled (isEnabled);
6002- return true ;
6003+ break ;
60036004 case WorldSpecialProperty::UNDERWORLDWARP:
60046005 g_pGame->SetUnderWorldWarpEnabled (isEnabled);
6005- return true ;
6006+ break ;
60066007 case WorldSpecialProperty::VEHICLESUNGLARE:
60076008 g_pGame->SetVehicleSunGlareEnabled (isEnabled);
6008- return true ;
6009+ break ;
60096010 case WorldSpecialProperty::CORONAZTEST:
60106011 g_pGame->SetCoronaZTestEnabled (isEnabled);
6011- return true ;
6012+ break ;
60126013 case WorldSpecialProperty::WATERCREATURES:
60136014 g_pGame->SetWaterCreaturesEnabled (isEnabled);
6014- return true ;
6015+ break ;
60156016 case WorldSpecialProperty::BURNFLIPPEDCARS:
60166017 g_pGame->SetBurnFlippedCarsEnabled (isEnabled);
6017- return true ;
6018+ break ;
60186019 case WorldSpecialProperty::FIREBALLDESTRUCT:
60196020 g_pGame->SetFireballDestructEnabled (isEnabled);
6020- return true ;
6021+ break ;
60216022 case WorldSpecialProperty::EXTENDEDWATERCANNONS:
60226023 g_pGame->SetExtendedWaterCannonsEnabled (isEnabled);
6024+ break ;
60236025 case WorldSpecialProperty::ROADSIGNSTEXT:
60246026 g_pGame->SetRoadSignsTextEnabled (isEnabled);
6025- return true ;
6027+ break ;
60266028 case WorldSpecialProperty::TUNNELWEATHERBLEND:
60276029 g_pGame->SetTunnelWeatherBlendEnabled (isEnabled);
6028- return true ;
6030+ break ;
60296031 case WorldSpecialProperty::IGNOREFIRESTATE:
60306032 g_pGame->SetIgnoreFireStateEnabled (isEnabled);
6031- return true ;
6033+ break ;
6034+ default :
6035+ return false ;
60326036 }
6033- return false ;
6037+
6038+ if (g_pNet->CanServerBitStream (eBitStreamVersion::WorldSpecialPropertyEvent)) {
6039+ NetBitStreamInterface* stream = g_pNet->AllocateNetBitStream ();
6040+ stream->WriteString (EnumToString (property));
6041+ stream->WriteBit (isEnabled);
6042+ g_pNet->SendPacket (PACKET_ID_PLAYER_WORLD_SPECIAL_PROPERTY, stream, PACKET_PRIORITY_HIGH, PACKET_RELIABILITY_RELIABLE_ORDERED);
6043+ g_pNet->DeallocateNetBitStream (stream);
6044+ }
6045+
6046+ return true ;
60346047}
60356048
60366049bool CClientGame::IsWorldSpecialProperty (WorldSpecialProperty property)
0 commit comments