| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
|---|---|---|---|---|---|---|---|---|---|
| 0003085 | Spring engine | Lua | public | 2012-05-11 17:51 | 2012-05-11 19:11 | ||||
| Reporter | Google_Frog | ||||||||
| Assigned To | jK | ||||||||
| Priority | normal | Severity | minor | Reproducibility | N/A | ||||
| Status | resolved | Resolution | fixed | ||||||
| Product Version | 88.0 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0003085: AllowWeaponTarget return ignores visibility | ||||||||
| Description | If true is returned from gadget:AllowWeaponTarget the weapon is able to target the targetID regardless of unit visibility. For example a lone cloaked unit within range will be automatically shot at. This has been worked around by checking for visibility within AllowWeaponTarget but it is a bad workaround because AllowWeaponTarget is called enough to create a performance issue. The below code is just a clarification of I would like an AllowWeaponTarget that minimises lua calls by only asking about units that Spring would chose as targets if Al  | ||||||||
| Additional Information | function gadget:AllowWeaponTarget(unitID, targetID, ...) if unitID can see targetID then if unit_I_want_to_handle[unitID] then -- do stuff else return true, 1 end else return false, 1 end end  | ||||||||
| Tags | No tags attached. | ||||||||
| Checked infolog.txt for Errors | |||||||||
| Attached Files | 
 | ||||||||
 Notes	 | 
|
| 
				
		 jK (developer) 2012-05-11 19:11  | 
	https://github.com/spring/spring/commit/2fafb1c7919a45932a4493fdbddc262f7664fe5b | 
 Issue History			 | 
		|||
| Date Modified | Username | Field | Change | 
|---|---|---|---|
| 2012-05-11 17:51 | Google_Frog | New Issue | |
| 2012-05-11 19:11 | jK | Note Added: 0008680 | |
| 2012-05-11 19:11 | jK | Status | new => resolved | 
| 2012-05-11 19:11 | jK | Resolution | open => fixed | 
| 2012-05-11 19:11 | jK | Assigned To | => jK | 

	
