Ticket #3177: camouflaging.patch
File camouflaging.patch, 29.1 KB (added by , 9 years ago) |
---|
-
binaries/data/config/default.cfg
280 280 garrison = Ctrl ; Modifier to garrison when clicking on building 281 281 autorallypoint = Ctrl ; Modifier to set the rally point on the building itself 282 282 guard = "G" ; Modifier to escort/guard when clicking on unit/building 283 camouflage = Space ; Toggle camouflaging 283 284 queue = Shift ; Modifier to queue unit orders instead of replacing 284 285 batchtrain = Shift ; Modifier to train units in batches 285 286 massbarter = Shift ; Modifier to barter bunch of resources -
binaries/data/mods/public/art/textures/ui/session/icons/camouflage_off.png
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
-
binaries/data/mods/public/art/textures/ui/session/icons/camouflage_on.png
Property changes on: binaries/data/mods/public/art/textures/ui/session/icons/camouflage_off.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
-
binaries/data/mods/public/art/textures/ui/session/icons/camouflaged.png
Property changes on: binaries/data/mods/public/art/textures/ui/session/icons/camouflage_on.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
-
binaries/data/mods/public/gui/session/hotkeys/misc.xml
Property changes on: binaries/data/mods/public/art/textures/ui/session/icons/camouflaged.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property
58 58 <action on="Press">stopUnits(g_Selection.toList());</action> 59 59 </object> 60 60 61 <!-- Toggle camouflaging for selected units --> 62 <object hotkey="session.camouflage"> 63 <action on="Press">toggleCamouflaging(g_Selection.toList());</action> 64 </object> 65 61 66 <!-- Find idle warrior - TODO: Potentially move this to own UI button? --> 62 67 <object hotkey="selection.idlewarrior"> 63 68 <action on="Press">findIdleUnit(["Hero", "Champion", "CitizenSoldier", "Siege", "Warship", "Dog"]);</action> -
binaries/data/mods/public/gui/session/input.js
1753 1753 Engine.PostNetworkCommand({ "type": "stop", "entities": entities, "queued": false }); 1754 1754 } 1755 1755 1756 function toggleCamouflaging(entities) 1757 { 1758 Engine.PostNetworkCommand({ "type": "camouflage", "entities": entities, "queued": false }); 1759 } 1760 1756 1761 function unload(garrisonHolder, entities) 1757 1762 { 1758 1763 if (Engine.HotkeyIsPressed("session.unloadtype")) -
binaries/data/mods/public/gui/session/selection_details.js
86 86 Engine.GetGUIObjectByName("healthSection").hidden = true; 87 87 } 88 88 89 // TODO:Stamina90 varplayer = Engine.GetPlayerID();89 // Stamina 90 let player = Engine.GetPlayerID(); 91 91 if (entState.stamina && (entState.player == player || g_DevSettings.controlAll)) 92 { 93 let unitStaminaBar = Engine.GetGUIObjectByName("staminaBar"); 94 let staminaSize = unitStaminaBar.size; 95 staminaSize.rright = 100*Math.max(0, Math.min(1, entState.stamina.stamina / entState.stamina.maxStamina)); 96 unitStaminaBar.size = staminaSize; 97 98 Engine.GetGUIObjectByName("staminaStats").caption = sprintf(translate("%(stamina)s / %(maxStamina)s"), { 99 stamina: Math.ceil(entState.stamina.stamina), 100 maxStamina: entState.stamina.maxStamina 101 }); 92 102 Engine.GetGUIObjectByName("staminaSection").hidden = false; 103 } 93 104 else 94 105 Engine.GetGUIObjectByName("staminaSection").hidden = true; 95 106 … … 250 261 else 251 262 Engine.GetGUIObjectByName("attackAndArmorStats").tooltip = armorString; 252 263 264 // Camouflaging 265 if (entState.stealth && entState.player == player) 266 { 267 let camouflaging = Engine.GetGUIObjectByName("camouflaging"); 268 camouflaging.hidden = false; 269 camouflaging.sprite = "stretched:session/icons/camouflage" + 270 (entState.stealth.activated ? "d" : "_" + (entState.stealth.requested ? "on" : "off")) + ".png"; 271 camouflaging.tooltip = "[font=\"sans-bold-13\"]" + translate("Camouflage:") + " [/font]" + 272 (entState.stealth.requested ? translate("On") : translate("Off")) + "\n" + 273 translate("Default hotkey for toggling camouflage is Space"); 274 if (entState.stealth.requested && !entState.stealth.activated) 275 camouflaging.tooltip += "\n[font=\"sans-bold-13\"]" + translate("You must be close to a tree!") + "[/font]"; 276 } 277 else 278 Engine.GetGUIObjectByName("camouflaging").hidden = true; 279 253 280 // Icon Tooltip 254 281 var iconTooltip = ""; 255 282 … … 291 318 var averageHealth = 0; 292 319 var maxHealth = 0; 293 320 321 let averageStamina = 0; 322 let maxStamina = 0; 323 294 324 for (var i = 0; i < selection.length; i++) 295 325 { 296 326 var entState = GetEntityState(selection[i]) … … 301 331 averageHealth += entState.hitpoints; 302 332 maxHealth += entState.maxHitpoints; 303 333 } 334 if (entState.stamina) 335 { 336 averageStamina += entState.stamina.stamina; 337 maxStamina += entState.stamina.maxStamina; 338 } 304 339 } 305 340 } 306 341 … … 321 356 { 322 357 Engine.GetGUIObjectByName("healthMultiple").hidden = true; 323 358 } 324 325 // TODO: Stamina326 // Engine.GetGUIObjectByName("staminaBarMultiple");327 359 360 if (averageStamina > 0) 361 { 362 let unitStaminaBar = Engine.GetGUIObjectByName("staminaBarMultiple"); 363 let staminaSize = unitStaminaBar.size; 364 staminaSize.rtop = 100-100*Math.max(0, Math.min(1, averageStamina / maxStamina)); 365 unitStaminaBar.size = staminaSize; 366 367 let staminaLabel = "[font=\"sans-bold-13\"]" + translate("Stamina:") + "[/font]" 368 let stamina = sprintf(translate("%(label)s %(current)s / %(max)s"), { label: staminaLabel, current: averageStamina, max: maxStamina }); 369 let staminaMultiple = Engine.GetGUIObjectByName("staminaMultiple"); 370 staminaMultiple.tooltip = stamina; 371 staminaMultiple.hidden = false; 372 } 373 else 374 { 375 Engine.GetGUIObjectByName("staminaMultiple").hidden = true; 376 } 377 328 378 Engine.GetGUIObjectByName("numberOfUnits").caption = selection.length; 329 379 330 380 // Unhide Details Area -
binaries/data/mods/public/gui/session/selection_panels_middle/single_details_area.xml
53 53 <translatableAttribute id="tooltip">Attack and Armor</translatableAttribute> 54 54 </object> 55 55 56 <!-- Camouflaging --> 57 <object size="120 -2 156 34" name="camouflaging" type="image" sprite="stretched:session/icons/camouflage_off.png" tooltip_style="sessionToolTip"> 58 <translatableAttribute id="tooltip">Camouflaging</translatableAttribute> 59 </object> 60 56 61 <!-- Resource carrying icon/counter --> 57 62 <!-- Used also for number of gatherers/builders --> 58 63 <object size="100%-98 -2 100%-28 34" type="text" name="resourceCarryingText" style="CarryingTextRight"/> -
binaries/data/mods/public/simulation/components/GuiInterface.js
225 225 "rallyPoint": null, 226 226 "resourceCarrying": null, 227 227 "rotation": null, 228 "stamina": null, 229 "stealth": null, 228 230 "trader": null, 229 231 "unitAI": null, 230 232 "visibility": null, … … 395 397 }; 396 398 } 397 399 400 var cmpStamina = Engine.QueryInterface(ent, IID_Stamina); 401 if (cmpStamina) 402 { 403 ret.stamina = { 404 "stamina": cmpStamina.GetStamina(), 405 "maxStamina": cmpStamina.GetMaxStamina(), 406 }; 407 } 408 409 var cmpStealth = Engine.QueryInterface(ent, IID_Stealth); 410 if (cmpStealth) 411 { 412 ret.stealth = { 413 "requested": cmpStealth.IsRequested(), 414 "activated": cmpStealth.IsActivated(), 415 }; 416 } 417 398 418 var cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager); 399 419 ret.visibility = cmpRangeManager.GetLosVisibility(ent, player); 400 420 -
binaries/data/mods/public/simulation/components/interfaces/Stamina.js
1 1 Engine.RegisterInterface("Stamina"); 2 3 // Message of the form { "from": 100, "to", 90 }, 4 // sent whenever stamina changes. 5 Engine.RegisterMessageType("StaminaChanged"); -
binaries/data/mods/public/simulation/components/interfaces/Stealth.js
1 Engine.RegisterInterface("Stealth"); -
binaries/data/mods/public/simulation/components/Stamina.js
1 1 function Stamina() {} 2 2 3 3 Stamina.prototype.Schema = 4 "<element name='Max' a:help='Maximum stamina (msecs of running)'>" + 5 "<data type='positiveInteger'/>" + 6 "</element>"; 4 "<element name='Max' a:help='Maximum stamina'>" + 5 "<ref name='nonNegativeDecimal'/>" + 6 "</element>" + 7 "<element name='RegenRate' a:help='Stamina regeneration rate per second.'>" + 8 "<ref name='nonNegativeDecimal'/>" + 9 "</element>" + 10 "<optional>" + 11 "<element name='Initial' a:help='Initial stamina. Default if unspecified is equal to 0'>" + 12 "<ref name='nonNegativeDecimal'/>" + 13 "</element>" + 14 "</optional>"; 7 15 8 /* 9 * TODO: this all needs to be designed and implemented 10 */ 16 Stamina.prototype.Init = function() 17 { 18 this.maxStamina = +this.template.Max; 19 this.regenRate = +this.template.RegenRate; 11 20 21 this.stamina = +(this.template.Initial || 0); 22 23 this.CheckRegenTimer(); 24 }; 25 26 Stamina.prototype.GetStamina = function() 27 { 28 return this.stamina; 29 }; 30 31 Stamina.prototype.GetMaxStamina = function() 32 { 33 return this.maxStamina; 34 }; 35 36 Stamina.prototype.CheckRegenTimer = function() 37 { 38 if ((this.stamina == this.maxStamina && this.regenRate > 0) || (this.stamina == 0 && this.regenRate < 0)) 39 { 40 // We don't need to regenerate stamina 41 if (this.regenTimer) 42 { 43 var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); 44 cmpTimer.CancelTimer(this.regenTimer); 45 this.regenTimer = undefined; 46 } 47 return; 48 } 49 50 // We need to regenerate, enable a timer if one doesn't exist 51 if (this.regenTimer) 52 return; 53 54 var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); 55 this.regenTimer = cmpTimer.SetInterval(this.entity, IID_Stamina, "UpdateStamina", 1000, 1000, null); 56 }; 57 58 Stamina.prototype.ToggleStaminaConsumer = function(enabled, costRate) 59 { 60 if (costRate >= 0) 61 { 62 warn("Activated stamina consumer with wrong cost"); 63 return; 64 } 65 66 if (enabled) 67 { 68 if (this.regenRate > 0) 69 this.regenRate = 0; 70 this.regenRate += costRate; 71 } 72 else 73 { 74 this.regenRate -= costRate; 75 if (this.regenRate >= 0) 76 this.regenRate = +this.template.RegenRate; 77 } 78 this.CheckRegenTimer(); 79 }; 80 81 Stamina.prototype.UpdateStamina = function() 82 { 83 if (this.regenRate == 0) 84 return; 85 86 let oldStamina = this.stamina; 87 this.stamina += this.regenRate; 88 if (this.stamina > this.maxStamina) 89 this.stamina = this.maxStamina; 90 91 Engine.PostMessage(this.entity, MT_StaminaChanged, { "from": oldStamina, "to": this.stamina }); 92 }; 93 94 Stamina.prototype.OnStaminaChanged = function(msg) 95 { 96 this.CheckRegenTimer(); 97 }; 98 12 99 Engine.RegisterComponentType(IID_Stamina, "Stamina", Stamina); -
binaries/data/mods/public/simulation/components/Stealth.js
1 function Stealth() {} 2 3 Stealth.prototype.Schema = 4 "<empty/>"; 5 6 Stealth.prototype.Init = function() 7 { 8 this.requested = false; // Whether the button is pushed 9 this.activated = false; // Whether we are actually camouflaged 10 this.staminaCostRate = -5.0; 11 }; 12 13 Stealth.prototype.IsActivated = function() 14 { 15 return this.activated; 16 }; 17 18 Stealth.prototype.IsRequested = function() 19 { 20 return this.requested; 21 }; 22 23 Stealth.prototype.Request = function(enabled) 24 { 25 this.requested = enabled; 26 if (enabled) 27 { 28 if (!this.IsTreeNear()) 29 return; 30 } 31 this.Toggle(enabled); 32 }; 33 34 /** 35 * We assume here that a tree is near. 36 */ 37 Stealth.prototype.Toggle = function(enabled) 38 { 39 if ((enabled && this.activated) || (!enabled && !this.activated)) 40 return; 41 42 let cmpStamina = Engine.QueryInterface(this.entity, IID_Stamina); 43 if (!cmpStamina) 44 return; 45 46 if (enabled && cmpStamina.stamina == 0) 47 return; 48 49 let cmpVisibility = Engine.QueryInterface(this.entity, IID_Visibility); 50 if (cmpVisibility) 51 cmpVisibility.SetActivated(enabled); 52 53 cmpStamina.ToggleStaminaConsumer(enabled, this.staminaCostRate); 54 this.activated = enabled; 55 }; 56 57 Stealth.prototype.IsTreeNear = function() 58 { 59 let cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager); 60 let filter = function(id) 61 { 62 let cmpIdentity = Engine.QueryInterface(id, IID_Identity); 63 return cmpIdentity.GetGenericName() == "Tree"; 64 } 65 66 let dist = 5; 67 let nearEnts = cmpRangeManager.ExecuteQuery(this.entity, 0, dist, [0], IID_ResourceSupply).filter(filter); 68 69 return nearEnts.length > 0; 70 }; 71 72 Stealth.prototype.OnPositionChanged = function(msg) 73 { 74 if (msg.entity != this.entity) 75 return; 76 77 if (this.requested) 78 this.Toggle(this.IsTreeNear()); 79 }; 80 81 Stealth.prototype.OnStaminaChanged = function(msg) 82 { 83 // When we are out of stamina, stop camouflaging and regenerate 84 if (msg.to == 0) 85 { 86 this.Request(false); 87 } 88 }; 89 90 Engine.RegisterComponentType(IID_Stealth, "Stealth", Stealth); -
binaries/data/mods/public/simulation/components/Visibility.js
67 67 return VIS_HIDDEN; 68 68 } 69 69 70 let cmpStealth = Engine.QueryInterface(this.entity, IID_Stealth); 71 if (cmpStealth) // No need to check the state, if the scriptedVisibility flag is set then Stealth is activated 72 { 73 let cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership); 74 if (!cmpOwnership) 75 return VIS_VISIBLE; 76 77 let cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager); 78 if (player >= cmpPlayerManager.GetNumPlayers()) 79 return VIS_HIDDEN; 80 let cmpPlayer = Engine.QueryInterface(cmpPlayerManager.GetPlayerByID(cmpOwnership.GetOwner()), IID_Player); 81 if (cmpPlayer && cmpPlayer.IsMutualAlly(player)) 82 return VIS_VISIBLE; 83 84 return VIS_HIDDEN; 85 } 86 70 87 return VIS_VISIBLE; 71 88 }; 72 89 -
binaries/data/mods/public/simulation/helpers/Commands.js
432 432 }); 433 433 }, 434 434 435 "camouflage": function(player, cmd, data) 436 { 437 for (let ent of data.entities) 438 { 439 let cmpOwnership = Engine.QueryInterface(ent, IID_Ownership); 440 if (!cmpOwnership || cmpOwnership.GetOwner() != player) 441 continue; 442 let cmpStealth = Engine.QueryInterface(ent, IID_Stealth); 443 if (cmpStealth) 444 cmpStealth.Request(!cmpStealth.IsRequested()); 445 } 446 }, 447 435 448 "unload": function(player, cmd, data) 436 449 { 437 450 // Verify that the building can be controlled by the player or is mutualAlly -
binaries/data/mods/public/simulation/templates/template_unit_cavalry.xml
88 88 </Sound> 89 89 <Stamina> 90 90 <Max>2000</Max> 91 <RegenRate>20</RegenRate> 92 <Initial>1000</Initial> 91 93 </Stamina> 92 94 <StatusBars> 93 95 <HeightOffset>6.5</HeightOffset> -
binaries/data/mods/public/simulation/templates/template_unit_champion_cavalry.xml
58 58 </Sound> 59 59 <Stamina> 60 60 <Max>2500</Max> 61 <RegenRate>20</RegenRate> 62 <Initial>1000</Initial> 61 63 </Stamina> 62 64 <StatusBars> 63 65 <HeightOffset>6.5</HeightOffset> -
binaries/data/mods/public/simulation/templates/template_unit_champion_elephant.xml
57 57 </Sound> 58 58 <Stamina> 59 59 <Max>2500</Max> 60 <RegenRate>20</RegenRate> 61 <Initial>1000</Initial> 60 62 </Stamina> 61 63 <StatusBars> 62 64 <HeightOffset>6.5</HeightOffset> -
binaries/data/mods/public/simulation/templates/template_unit_champion_infantry.xml
45 45 </Sound> 46 46 <Stamina> 47 47 <Max>1500</Max> 48 <RegenRate>20</RegenRate> 48 49 </Stamina> 49 50 <UnitMotion> 50 51 <WalkSpeed>8.5</WalkSpeed> -
binaries/data/mods/public/simulation/templates/template_unit_hero_cavalry.xml
46 46 </Sound> 47 47 <Stamina> 48 48 <Max>2500</Max> 49 <RegenRate>20</RegenRate> 50 <Initial>1000</Initial> 49 51 </Stamina> 50 52 <StatusBars> 51 53 <HeightOffset>6.5</HeightOffset> -
binaries/data/mods/public/simulation/templates/template_unit_hero_infantry_pikeman.xml
33 33 <wood>10</wood> 34 34 <metal>10</metal> 35 35 </Loot> 36 <Stamina>37 <Max>1200</Max>38 </Stamina>39 36 <UnitMotion> 40 37 <WalkSpeed>8.5</WalkSpeed> 41 38 <Run> -
binaries/data/mods/public/simulation/templates/template_unit_infantry.xml
114 114 </Sound> 115 115 <Stamina> 116 116 <Max>1000</Max> 117 <RegenRate>15</RegenRate> 117 118 </Stamina> 118 119 <UnitMotion> 119 120 <WalkSpeed>9</WalkSpeed> -
binaries/data/mods/public/simulation/templates/template_unit_support_female_citizen.xml
94 94 </Sound> 95 95 <Stamina> 96 96 <Max>500</Max> 97 <RegenRate>5</RegenRate> 97 98 </Stamina> 98 99 <UnitAI> 99 100 <AlertReactiveLevel>1</AlertReactiveLevel> -
binaries/data/mods/public/simulation/templates/units/athen_infantry_marine_archer_a.xml
23 23 <ResourceGatherer> 24 24 <BaseSpeed>0.75</BaseSpeed> 25 25 </ResourceGatherer> 26 <Stamina>27 <Max>700</Max>28 </Stamina>29 26 <VisualActor> 30 27 <Actor>units/macedonians/infantry_archer_a.xml</Actor> 31 28 </VisualActor> -
binaries/data/mods/public/simulation/templates/units/athen_infantry_marine_archer_e.xml
21 21 <ResourceGatherer> 22 22 <BaseSpeed>0.5</BaseSpeed> 23 23 </ResourceGatherer> 24 <Stamina>25 <Max>690</Max>26 </Stamina>27 24 <UnitMotion> 28 25 <WalkSpeed>8</WalkSpeed> 29 26 <Run> -
binaries/data/mods/public/simulation/templates/units/cart_infantry_archer_a.xml
23 23 <ResourceGatherer> 24 24 <BaseSpeed>0.75</BaseSpeed> 25 25 </ResourceGatherer> 26 <Stamina>27 <Max>700</Max>28 </Stamina>29 26 <VisualActor> 30 27 <Actor>units/carthaginians/infantry_archer_a.xml</Actor> 31 28 </VisualActor> -
binaries/data/mods/public/simulation/templates/units/cart_infantry_archer_e.xml
21 21 <ResourceGatherer> 22 22 <BaseSpeed>0.5</BaseSpeed> 23 23 </ResourceGatherer> 24 <Stamina>25 <Max>690</Max>26 </Stamina>27 24 <UnitMotion> 28 25 <WalkSpeed>8</WalkSpeed> 29 26 <Run> -
binaries/data/mods/public/simulation/templates/units/iber_infantry_swordsman_b.xml
15 15 <Promotion> 16 16 <Entity>units/iber_infantry_swordsman_a</Entity> 17 17 </Promotion> 18 <Stealth/> 18 19 <VisualActor> 19 20 <Actor>units/iberians/infantry_swordsman_b.xml</Actor> 20 21 </VisualActor> -
binaries/data/mods/public/simulation/templates/units/mace_infantry_archer_a.xml
23 23 <ResourceGatherer> 24 24 <BaseSpeed>0.75</BaseSpeed> 25 25 </ResourceGatherer> 26 <Stamina>27 <Max>700</Max>28 </Stamina>29 26 <VisualActor> 30 27 <Actor>units/macedonians/infantry_archer_a.xml</Actor> 31 28 </VisualActor> -
binaries/data/mods/public/simulation/templates/units/mace_infantry_archer_e.xml
21 21 <ResourceGatherer> 22 22 <BaseSpeed>0.5</BaseSpeed> 23 23 </ResourceGatherer> 24 <Stamina>25 <Max>690</Max>26 </Stamina>27 24 <UnitMotion> 28 25 <WalkSpeed>8</WalkSpeed> 29 26 <Run> -
binaries/data/mods/public/simulation/templates/units/ptol_infantry_archer_a.xml
23 23 <ResourceGatherer> 24 24 <BaseSpeed>0.75</BaseSpeed> 25 25 </ResourceGatherer> 26 <Stamina>27 <Max>700</Max>28 </Stamina>29 26 <UnitMotion> 30 27 <WalkSpeed>11</WalkSpeed> 31 28 <Run> -
binaries/data/mods/public/simulation/templates/units/ptol_infantry_archer_e.xml
21 21 <ResourceGatherer> 22 22 <BaseSpeed>0.5</BaseSpeed> 23 23 </ResourceGatherer> 24 <Stamina>25 <Max>690</Max>26 </Stamina>27 24 <UnitMotion> 28 25 <WalkSpeed>10.5</WalkSpeed> 29 26 <Run> -
binaries/data/mods/public/simulation/templates/units/sele_infantry_archer_merc_a.xml
23 23 <ResourceGatherer> 24 24 <BaseSpeed>0.75</BaseSpeed> 25 25 </ResourceGatherer> 26 <Stamina>27 <Max>700</Max>28 </Stamina>29 26 <VisualActor> 30 27 <Actor>units/macedonians/infantry_archer_a.xml</Actor> 31 28 </VisualActor> -
binaries/data/mods/public/simulation/templates/units/sele_infantry_archer_merc_e.xml
21 21 <ResourceGatherer> 22 22 <BaseSpeed>0.5</BaseSpeed> 23 23 </ResourceGatherer> 24 <Stamina>25 <Max>690</Max>26 </Stamina>27 24 <UnitMotion> 28 25 <WalkSpeed>8</WalkSpeed> 29 26 <Run> -
source/simulation2/components/CCmpRangeManager.cpp
1425 1425 EntityMap<EntityData>::iterator it = m_EntityData.find(ent); 1426 1426 if (it != m_EntityData.end()) 1427 1427 it->second.scriptedVisibility = status ? 1 : 0; 1428 RequestVisibilityUpdate(ent); 1428 1429 } 1429 1430 1430 1431 ELosVisibility ComputeLosVisibility(CEntityHandle ent, player_id_t player)