View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000550 | Spring engine | General | public | 2007-06-17 15:05 | 2007-06-26 21:48 |
| Reporter | imbaczek | Assigned To | tvo | ||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0000550: [patch] targetBorder tag - allow weapons to target a point closer to the edge of collision sphere | ||||
| Description | Rationale: allow more flexibility to unit design and (perhaps) allow for a simplified melee implementation using beamlasers. | ||||
| Additional Information | targetBorder is a float in [-1; 1] range is a scale of transformation of a target point, where 0 means center of collision sphere and 1 means the point on the edge closest to the weaponPos. -1 is a point on the edge furthes away of the weapon, every value in between is accepted and interpreted correctly. The patch includes some whitespace fixes (mostly removing trailing whitespace) thanks to auto-fixing by my IDE. Sorry about that. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
patch v2, allows for simple melee combat. changelog: all files: - removed trailing whitespace ProjectileHandler.cpp WeaponProjectile.cpp - just whitespace GameHelper.cpp: - fixed raytrace code (apparently GUI raytrace made it into targetting raytrace) LuaWeaponDefs.cpp UnitLoader.cpp - added tags: targetBorder, cylinderTargetting, minIntensity MobileCAI.{cpp,h} - added lastCloseInTry (in ticks) - made units aware of targetBorder BeamLaser.cpp Weapon.h - added minIntensity tag - made cylinderTargetting and targetBorder to increase ray length - KDR's weaponMuzzlePos patch - tested to work with beamlasers Weapon.cpp Weapon.h WeaponDefHandler.cpp WeaponDefHandler.h - KDR's weaponMuzzlePos patch - tested to work with beamlasers - KDR's COB AimFromPrimary/QueryPrimary changes - do not fire at cloaked units - TryTarget made to respect targetBorder and cylinderTargetting - added tags: * float targetBorder - if nonzero, targetting units will TryTarget at the edge of collision sphere (radius*tag_value, [-1;1]) instead of its centre * float cylinderTargetting - if greater than 0, range will be checked in a cylinder (half height=unitradius*cylinderTargetting) instead of a sphere * float minIntensity - for beamlasers - always hit with some minimum intensity (a damage coeffcient normally dependent on distance). do not confuse with intensity tag, it's completely unrelated. |
|
|
So targetborder_minintensity_cylinderTargetting_and_weaponMuzzlePos.diff replaces targetBorder.diff? Could you factor out KDR_11k's patch (reverse them maybe?), because he is working on a better one I think so having yours together with an old one of KDR would give conflicts with his newer patch... |
|
|
Yup, the bigger one supersedes the smaller one. I'll see what I can do about KDR's patch. |
|
|
uploaded a patch without KDR's modifications. updated changelog: all files: - removed trailing whitespace ProjectileHandler.cpp WeaponProjectile.cpp - just whitespace GameHelper.cpp: - fixed raytrace code (apparently GUI raytrace made it into targetting raytrace) LuaWeaponDefs.cpp UnitLoader.cpp - added tags: targetBorder, cylinderTargetting, minIntensity MobileCAI.{cpp,h} - added lastCloseInTry (in ticks) - made units aware of targetBorder BeamLaser.cpp Weapon.h - added minIntensity tag - made cylinderTargetting and targetBorder to increase ray length Weapon.cpp Weapon.h WeaponDefHandler.cpp WeaponDefHandler.h - do not fire at cloaked units - TryTarget made to respect targetBorder and cylinderTargetting - added tags: * float targetBorder - if nonzero, targetting units will TryTarget at the edge of collision sphere (radius*tag_value, [-1;1]) instead of its centre * float cylinderTargetting - if greater than 0, range will be checked in a cylinder (half height=unitradius*cylinderTargetting) instead of a sphere * float minIntensity - for beamlasers - always hit with some minimum intensity (a damage coeffcient normally dependent on distance). do not confuse with intensity tag, it's completely unrelated. MeleeWeapon.cpp - added impulseDir |
|
|
Small suggestion: Can you make targetBorder default to 1 for the Melee weapon? |
|
|
done. updated changelog: all files: - removed trailing whitespace ProjectileHandler.cpp WeaponProjectile.cpp - just whitespace GameHelper.cpp: - fixed raytrace code (apparently GUI raytrace made it into targetting raytrace) LuaWeaponDefs.cpp UnitLoader.cpp - added tags: targetBorder, cylinderTargetting, minIntensity MobileCAI.{cpp,h} - added lastCloseInTry (in ticks) - made units aware of targetBorder BeamLaser.cpp Weapon.h - added minIntensity tag - made cylinderTargetting and targetBorder to increase ray length Weapon.cpp Weapon.h WeaponDefHandler.cpp WeaponDefHandler.h - do not fire at cloaked units - TryTarget made to respect targetBorder and cylinderTargetting - added tags: * float targetBorder - if nonzero, targetting units will TryTarget at the edge of collision sphere (radius*tag_value, [-1;1]) instead of its centre * float cylinderTargetting - if greater than 0, range will be checked in a cylinder (half height=unitradius*cylinderTargetting) instead of a sphere * float minIntensity - for beamlasers - always hit with some minimum intensity (a damage coeffcient normally dependent on distance). do not confuse with intensity tag, it's completely unrelated. - if weaponType==Melee, then defaults for targetBorder and cylinderTargetting are 1 instead of 0. MeleeWeapon.cpp - added impulseDir |
|
|
Committed, r3861, except for the cloakable units bit, since that's 1) another bug and 2) works fine already, I think (I will elaborate in the other bug) Thanks for your contribution! |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2007-06-17 15:05 | imbaczek | New Issue | |
| 2007-06-17 15:05 | imbaczek | File Added: targetBorder.diff | |
| 2007-06-22 19:01 | imbaczek | Note Added: 0000968 | |
| 2007-06-22 19:01 | imbaczek | File Added: targetborder_minintensity_cylinderTargetting_and_weaponMuzzlePos.diff | |
| 2007-06-23 22:39 | tvo | Note Added: 0000974 | |
| 2007-06-23 23:08 | imbaczek | Note Added: 0000975 | |
| 2007-06-24 00:40 | imbaczek | File Added: targetborder_minintensity_cylinderTargetting_and_weaponMuzzlePos_v2.patch | |
| 2007-06-24 00:41 | imbaczek | Note Added: 0000977 | |
| 2007-06-24 11:05 | KDR_11k | Note Added: 0000978 | |
| 2007-06-25 16:27 | imbaczek | File Added: targetborder_minintensity_cylinderTargetting_and_weaponMuzzlePos_v3.patch | |
| 2007-06-25 16:27 | imbaczek | Note Added: 0000983 | |
| 2007-06-26 21:47 | tvo | Status | new => assigned |
| 2007-06-26 21:47 | tvo | Assigned To | => tvo |
| 2007-06-26 21:48 | tvo | Status | assigned => resolved |
| 2007-06-26 21:48 | tvo | Resolution | open => fixed |
| 2007-06-26 21:48 | tvo | Note Added: 0000985 |