User:Krudat: Difference between revisions

From Spring
Jump to navigationJump to search
Mr6Ukb (talk | contribs)
mNo edit summary
Posts (talk | contribs)
revert spam, odd one
 
Line 1: Line 1:
[http://people.msoe.edu/~millerni/forums.php?show=topic&id=96&forum=13 buy diazepam] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=148&forum=13 order tramadol] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=156&forum=13 cheap wellbutrin] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=107&forum=13 free jazz ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a00 rivotril online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=119&forum=13 free mtv ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=110&forum=13 cheap lipitor] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=89&forum=13 cheap celexa] [http://wc1.worldcrossing.com/WebX/.1de609e0 cheap ativan] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=123&forum=13 nokia ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f9 norco online] [http://wc1.worldcrossing.com/WebX/.1de60a18 free motorola ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2c but ultram] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=150&forum=13 cheap ultram] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=124&forum=13 norco] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=116&forum=13 mono ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0e celexa online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=97&forum=13 buy didrex] [http://wc1.worldcrossing.com/WebX/.1de609fa online pharmacy] [http://wc1.worldcrossing.com/WebX/.1de60a24 cheap propecia] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=128&forum=13 cheap phentermine] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=153&forum=13 buy viagra] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=154&forum=13 vicodin online] [http://wc1.worldcrossing.com/WebX/.1de60a27 but sildenafil] [http://wc1.worldcrossing.com/WebX/.1de60a1f cheap lisinopril] [http://wc1.worldcrossing.com/WebX/.1de60a26 free sharp ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a16 online levitra] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=103&forum=13 funny ringtones] [http://wc1.worldcrossing.com/WebX/.1de609ee but hydrocodone] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=151&forum=13 valium] [http://wc1.worldcrossing.com/WebX/.1de609e5 cool ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e4 cheap clonazepam] [http://wc1.worldcrossing.com/WebX/.1de609e6 cyclobenzaprine online] [http://wc1.worldcrossing.com/WebX/.1de60a35 free verizon ringtones] [http://wc1.worldcrossing.com/WebX/.1de609ec hgh online] [http://wc1.worldcrossing.com/WebX/.1de609df cheap ambien] [http://wc1.worldcrossing.com/WebX/.1de60a03 sony ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0f cialis online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=91&forum=13 cingular ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=90&forum=13 cheap cialis] [http://wc1.worldcrossing.com/WebX/.1de60a33 prozac online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=133&forum=13 qwest ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a10 didrex online] [http://wc1.worldcrossing.com/WebX/.1de609fd punk ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a14 jazz ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=102&forum=13 free free ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2b but ultracet] [http://wc1.worldcrossing.com/WebX/.1de60a1e flexeril online] [http://wc1.worldcrossing.com/WebX/.1de609f8 free nokia ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=87&forum=13 ativan online] [http://wc1.worldcrossing.com/WebX/.1de60a09 viagra online] [http://wc1.worldcrossing.com/WebX/.1de609f3 midi ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=142&forum=13 free sony ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=135&forum=13 free real ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=82&forum=13 adipex online] [http://wc1.worldcrossing.com/WebX/.1de609eb free funny ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=132&forum=13 free punk ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=146&forum=13 tenuate online] [http://wc1.worldcrossing.com/WebX/.1de609f2 meridia online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=108&forum=13 free kyocera ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a05 free sprint ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=114&forum=13 meridia] [http://wc1.worldcrossing.com/WebX/.1de60a06 tenuate online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=92&forum=13 cheap clomid] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=86&forum=13 ambien online] [http://wc1.worldcrossing.com/WebX/.1de60a04 sonyericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e3 clomid online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=120&forum=13 free music ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=99&forum=13 ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=109&forum=13 cheap levitra] [http://wc1.worldcrossing.com/WebX/.1de60a0d free wwe ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a15 free kyocera ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a20 nexium online] [http://wc1.worldcrossing.com/WebX/.1de60a19 free mp3 ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=104&forum=13 cheap hgh] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=158&forum=13 cheap xanax] [http://wc1.worldcrossing.com/WebX/.1de60a01 sagem ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a30 cheap xenical] [http://wc1.worldcrossing.com/WebX/.1de609de but alprazolam] [http://wc1.worldcrossing.com/WebX/.1de60a1b free music ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a31 buy zanaflex] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=152&forum=13 verizon ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f7 free nextel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=147&forum=13 tracfone ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a11 buy diethylpropion] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=83&forum=13 cheap albuterol] [http://wc1.worldcrossing.com/WebX/.1de60a29 tramadol online] [http://wc1.worldcrossing.com/WebX/.1de60a25 samsung ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=118&forum=13 mp3 ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=157&forum=13 wwe ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a28 cheap soma] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=139&forum=13 free sharp ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=111&forum=13 order lisinopril] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=126&forum=13 cheap paxil] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=117&forum=13 free motorola ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=138&forum=13 samsung ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=155&forum=13 vigrx] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=140&forum=13 sildenafil online] [http://wc1.worldcrossing.com/WebX/.1de60a21 buy paxil] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=160&forum=13 zanaflex online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=136&forum=13 cheap rivotril] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=98&forum=13 diethylpropion online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=145&forum=13 sprint ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=129&forum=13 polyphonic ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=137&forum=13 sagem ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=121&forum=13 cheap nexium] [http://wc1.worldcrossing.com/WebX/.1de60a1d free cingular ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=95&forum=13 cheap cyclobenzaprine] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=127&forum=13 cheap pharmacy online] [http://wc1.worldcrossing.com/WebX/.1de609dd free alltel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=144&forum=13 free sonyericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a34 sony ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e7 diazepam online] [http://wc1.worldcrossing.com/WebX/.1de60a0a vicodin online] [http://wc1.worldcrossing.com/WebX/.1de60a17 buy lipitor] [http://wc1.worldcrossing.com/WebX/.1de60a0b vigrx online] [http://wc1.worldcrossing.com/WebX/.1de60a1a mtv ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=141&forum=13 soma online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=112&forum=13 lorazepam online] [http://wc1.worldcrossing.com/WebX/.1de609ff real ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=162&forum=13 zyban online] [http://wc1.worldcrossing.com/WebX/.1de609dc buy albuterol] [http://wc1.worldcrossing.com/WebX/.1de60a12 free ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f0 cheap lorazepam] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=161&forum=13 but zoloft] [http://wc1.worldcrossing.com/WebX/.1de609db but adipex] [http://wc1.worldcrossing.com/WebX/.1de60a0c buy wellbutrin] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=84&forum=13 alltel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=94&forum=13 cool ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=122&forum=13 nextel ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a32 online zoloft] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=93&forum=13 clonazepam online] [http://wc1.worldcrossing.com/WebX/.1de60a2d valium online] [http://wc1.worldcrossing.com/WebX/.1de60a13 fioricet online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=115&forum=13 midi ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2e xanax online] [http://wc1.worldcrossing.com/WebX/.1de60a23 polyphonic ringtones] [http://wc1.worldcrossing.com/WebX/.1de609ed hoodia online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=113&forum=13 but lortab] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=85&forum=13 order alprazolam] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=106&forum=13 cheap hydrocodone] [http://wc1.worldcrossing.com/WebX/.1de609f1 cheap lortab] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=149&forum=13 ultracet online] [http://wc1.worldcrossing.com/WebX/.1de609ea free ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f4 mono ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=88&forum=13 cheap carisoprodol] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=143&forum=13 sony ringtones] [http://wc1.worldcrossing.com/WebX/.1de609fb cheap ortho] [http://wc1.worldcrossing.com/WebX/.1de60a07 free tracfone ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a22 phentermine] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=125&forum=13 ortho online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=159&forum=13 cheap xenical] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=131&forum=13 prozac online] [http://wc1.worldcrossing.com/WebX/.1de609e1 carisoprodol online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=130&forum=13 cheap propecia] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=101&forum=13 flexeril] [http://wc1.worldcrossing.com/WebX/.1de609fe free qwest ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=100&forum=13 buy fioricet] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=105&forum=13 hoodia online] [http://wc1.worldcrossing.com/WebX/.1de60a36 cheap zyban] [http://people.msoe.edu/~millerni/forums.php?show=topic
== Hmm, new scripting language, eh? ==
 
A lot of what's given here is ... "structurally sensitive"? Specifically, I get the impression Zaphod would like to delay some feature additions until a new scripting language arrives (and [http://taspring.clan-sy.com/phpbb/viewtopic.php?p=65295&highlight=executes#65295 Argh might agree, I think]). More generally, what's the easy fix or implementation might not be the best structurally (even before the level of finding some weird replacement for COB).
 
Implementing a change is easy. Doing it ''right'', particularly in the eyes of the admins, is another matter.
 
== Meben's Code Parade ==
 
You know when they say "Use the Source, Luke"? It's a suprising amount of
work - and that's for someone who can almost read C++. Many times, when
someone adds a bug in [http://spring.clan-sy.com/mantis Mantis] or posts in
the forums, I read the code closely and try and find the relevant bits.
I figured since I write it down, I might as well write it down where I can
find it again, and where someone else might find it useful.
 
Rules: don't touch the lobby client, no snide commentary. Just code
references.
 
(WebSVN doesn't give per-line anchors. So much for code references.)
 
=== #00048: Ferromancer: Unit Behavior: Construction units on patrol claim resources when not needed. === ([http://taspring.clan-sy.com/mantis/view.php?id=48 Mantis])
 
Add a check around [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Units/CommandAI/BuilderCAI.cpp?op=blame&rev=963&sc=0  CBuilderCAI]:452.
 
=== #00050: Ferromancer: Ground construction units attempt to repair air units while in flight === ([http://taspring.clan-sy.com/mantis/view.php?id=50 Mantis])
 
I ''think'' <code>CMD_PATROL</code> is a point rather than a path. (And why
does it push a copy of itself?) (And it's been that way since ancient SF
CVS.) (Oh, and deque semantics are a pain - the docs don't define them very
well. I ''hope'' <tt>commandQue.push_front(co) means commandQue[0] == co</tt> ...)
<nowiki>[TODO Whoever made templated network messages can start on commands now. :P]</nowiki>
 
I'd still need to figure out how to tell if the current repair job is the
fault of a patrol command, and how to abort it.
 
The policy question is how and when the con-bot decides to give up on the
air unit and do something else. (How far is 'too far' from the patrol
position?)
 
 
=== #00052: Bug Hunter: Units acknoledge enemy "bugger of" === ([http://taspring.clan-sy.com/mantis/view.php?id=52 Mantis])
 
Perhaps Bug Hunter picked the phrase "bugger off" because that's what it's
called in code. You can even do it from COB.
 
If you ''couldn't'', I'd just get [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Game/GameHelper.cpp?op=file&rev=0&sc=0 helper->BuggerOff] to check team or ally
relationships (or whatever it is). But for all I know, units only clear
factory buildpads because the factory script asks them to.
 
---
 
ColCheckH and ColCheckV in [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Units/MoveTypes/groundmovetype.cpp?op=file&rev=0&sc=0 groundmovetype.cpp] tell fellow ground-pounders to
get out of the way on close collision. I'd guess this is the code that
prevents anyone ever making a nice neat line of units. =) Including, in this
case, the enemy. Unfortunately, the rest of the file, at a glance, looks
like Spring's ever-fragile ground pather.
 
=== #00066: Argh: S3O Explosion Behavior === ([http://taspring.clan-sy.com/mantis/view.php?id=66 Mantis])
 
It shouldn't be ''impossible'' to let s3o ''pieces'' explode without
<tt>SHATTER</tt>. Making s3os shatterable would take a little longer since we've got
arrays of verticies rather than 3do-style faces.
 
However, in Feb. 2006, someone said something about writing a model-type abstraction that would include Ogre meshes, whatever those are. Again in March, someone's tinkering with unit textures.
 
=== #00068: Argh: Behavior of FALL scripting event === ([http://taspring.clan-sy.com/mantis/view.php?id=68 Mantis])
 
Unfortunately, I don't have the source for the AA Vulcan, which features ejecting cases.
 
There's an ancient note that all such fragments must <code>FALL</code> otherwise they'll
never go away.
 
I'd have to fire up OTA to get the correct behaviour.
 
(PieceProjectiles do exactly 50 damage.)
 
=== #00105: FizWizz: FPS aiming === ([http://taspring.clan-sy.com/mantis/view.php?id=105 Mantis])
 
Here's one for the compiler trivia books. The (original) GetHAndPFromVector (in myMath.h - WebSVN doesn't like links across file moves) crashed in one quarter (under Linux only!). However, I bet the call to COBFN_AimPrimary in [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Weapons/Weapon.cpp?op=file&rev=0&sc=0 CWeapon]::Update was working fine, despite using similar code, and probably wanting the same results.
 
Commenting out the code to ask the FPU to choke immediately probably made it exhibit something like the current behaviour, I can't remember.
 
(Called at the top of Game/Game.cpp::Update.)
 
GetHAndPFromVector is only used in one place, for the direct-control stuff.
 
=== #00116: NOiZE: Cloakcosts are doubled === ([http://taspring.clan-sy.com/mantis/view.php?id=116 Mantis])
 
Metal generation, energy use and idle regeneration are handled in [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Units/Unit.cpp?op=file&rev=0&sc=0  CUnit]::SlowUpdate().
 
Metal and energy gain and a couple of other per-unit-time values are divided
in half in there, but the cloak energy cost isn't.
 
You can even see the 'half-cost' of things when you, say, turn a metalmaker,
or a cloak, on or off.
 
=== #00118: Argh: Feature Request: "Free Interceptor" behavior. === ([http://taspring.clan-sy.com/mantis/view.php?id=118 Mantis])
 
==== How they work now ====
 
The [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Weapons/Weapon.cpp?op=file&rev=0&sc=0 base Weapon inherit] like it's willing to
point any weapon at an incoming projectile (<code>::CheckIntercept</code>, called by
<code>CWeapon::Update</code>). There's even a couple of interceptor-specific checks in
it. However, ''only'' Starburst-type indirect-fire missiles have the right
callbacks for being both interceptable and interceptors.
 
[http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Weapons/StarburstLauncher.cpp?op=file&rev=0&sc=0 <code>CStarburstLauncher::Fire</code>] tells [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Misc/InterceptHandler.cpp?op=file&rev=0&sc=0 CInterceptHandler] about the
new projectile, if it's <code>weaponDef->targetable</code>.
 
Only [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Projectiles/StarburstProjectile.cpp?op=file&rev=0&sc=0 CStarburstProjectile] takes an interceptTarget. In its ::Update, it
checks if the nuke is 'close'. If so, it tells first the nuke then itself
that they've hit something, which makes both of them blow up ([http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Game/GameHelper.cpp?op=file&rev=0&sc=0  helper->Explosion]).  
 
(It looks like the reason why the nuke's airburst doesn't do significant damage is because, on Small Divide, they travel higher than aircraft.)
 
==== Unpinning the behaviour ====
 
I haven't tried it, but it would be relatively easy to have an anti-nuke, say, Vulcan. (... It's the only salvoing unit who's projectile class I've looked up.)
 
* (Might need to change CWeapon::Update()'s call to CheckIntercept() to wait until the salvo ends, so        the entire salvo points at the nuke. I haven't tested this.)
* Add the interceptTarget argument to CCannon and parameter to CExplosiveProjectile.  
* Copy the range-to-nuke check to CExplosiveProjectile::Update() from StarburstProjectile.
 
This is nice and easy 'cause each interceptor round only needs to check one
projectile (probably every frame). This presumes that more nukes than
interceptors never happens - if not, then you'll get to see the volley of
Vulcan fire take out one nuke, but probably mysteriously fail to destroy the
other.
 
If I want to see a hail of laser fire from the Smasher completely defuse a volley from the Raven, I'd have a problem. Either:
 
* I do it the simple way and have every interceptor check every interceptable. I'd guess it'd be bad for performance. (Mustn't forget to check the ally-teams of the projectiles. ... Wait, they don't have any. :S)
 
* Someone who understands how the QuadField works extends it (re-fac-tor!) to record interceptable projectiles. Sadly, it mentions SQUARE_SIZE, which is my current cue to find some other aspect of Spring to read.
 
=== #000119: Argh:  Feature Request: "Free Repulsor". ===
 
Note: The [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Projectiles/BeamLaserProjectile.cpp?op=file&rev=0&sc=0 beam laser projectile] does the drawing; you'll find the damage ("explosion"!) is done when the weapon <code>::Fire()</code>s.
 
If I pin down the math for a ray reflection, it'll get used two different ways in two places; once in the reflector to give laser bolts a new heading, and again in BeamLaser to bounce off repulsors (with an extra projectile per reflection) 'till something gets hit.
 
=== #000123: Decimator: Laser weapons will not even attempt to shoot through trees === ([http://taspring.clan-sy.com/mantis/view.php?id=123 Mantis])
 
... and have done so since SF CVS day dot ([http://cvs.sourceforge.net/viewcvs.py/springrts/taspring/rts/BeamLaser.cpp?rev=1.1&view=markup BeamLaser.cpp]).
 
One, two, skip a few...
 
{|
| Unit       
| Target DT?
| Trees?
| Weapon's class             
| Call responsible
|-
| Annihilator
|   
|     
| CBeamLaser       
| helper->LineFeatureCol
|-
| Ambusher   
| X 
| X   
| CCannon           
|
|-
| Rocko     
| X 
| X   
| CMissileLauncher 
|
|-
| Raven     
| X 
| X   
|                   
|
|-
| HLT       
|   
|     
| CLaserCannon     
| helper->LineFeatureCol
|-
| Defender   
| X 
| X   
| CMissileLauncher 
|
|-
| Merl       
| X 
| X   
| CStarburstLauncher
|
|-
| Zeus       
|   
|     
| CLightningCannon 
| helper->LineFeatureCol
|-
| Maverick   
| ? 
| X   
|                   
|
|}
 
I think there's an MTR somewhere here, but I'm not entirely sure what it is.
 
 
=== Unit sounds and position ===
 
Something only occasionally noted is that individual unit-selected sounds play where the unit is, so if you're zoomed out or off-screen, you can't hear them.
 
* [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=1248 Sound]
* [http://taspring.clan-sy.com/phpbb/viewtopic.php?p=15984#15984 Making sounds audible again]
* [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2239 Soundvolume is too low when zoomed out]
* [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=4242&highlight=sound volume vs distance]  
 
([[Monthly_Topic_Rotation|MTR]]! <nowiki>*ahem*</nowiki> Maybe not.)
 
''' And some random sound-related posts '''
* [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2522 Using play-sound in Spring], and how StartMoving() is called "exactly a bazillion times per second in first person view", like AimPrimary() apparently is. I'm not sure if I could try to fix it, and I ''am'' sure I'd add another strand of spaghetti to Spring on my first few attempts.
* [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2667 please make the berthasound more quiet!]. For the record, the DGun's sound has a specific volume nerf ([http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Units/UnitLoader.cpp?op=blame&rev=0&sc=0 CUnitLoader]::LoadWeapon, near the bottom). It also suggests modder-settable sound-specific volume nerfs, or something.
* [http://taspring.clan-sy.com/phpbb/viewtopic.php?t=3728 Sound effects still played if you have no LoS]
 
Hmm. I could almost sketch out a design for a new "[http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/System/Sound.h?op=file&rev=0&sc=0 ISound]" with these requirements...
 
* SetSoundVolume(id, volume) so users can quiet down their artillery
* PlayUnitNotificationSound(id, unit, volume) so we can toggle between sound at unit and sound at player
* Some sort of IVolumeCalculator or something, so you can have
** the cameras setting different sound models: a near-2D sound system, immune to zooming out, for overhead view and an at-camera all-3D sound system for FPS-type views, see the above threads.
** Not to mention the different functions and fudge factors for ''how'' the volumes fall off with location.
* Perhaps add a sound priority (int) to all the PlaySounds so the LLTs don't replace the Vulcans' sounds, or possibly vice versa. Currently, the OpenAL system has a ring-buffer of 16 simultaneous sounds, maybe. I haven't looked at that too closely...
* A mute(bool) method.
 
=== Zero Damage === (Mantis: [http://spring.clan-sy.com/mantis/view.php?id=140 1], [http://spring.clan-sy.com/mantis/view.php?id=147 2])
 
(Damage and health are floats! For the sake of players, please assume Spring will only ever show whole-number amounts... In any case, this means you only need ridiculous amounts of smallarms fire to  significantly damage a tank.)
 
Issues (so far...):
 
'''Explosion graphics''':
 
: [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Rendering/ExplosionGraphics.cpp?op=file&rev=0&sc=0 CStdExplosionGraphics]
 
:inverse square root, for smoke particle velocity
 
:default damage: <code>damages[0]</code>.
 
:Should 0 ''default'' damage produce a Peewee-sized smokepuff, or nothing at all?
 
'''Unsupervised target choice''':
 
:<code>[http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Game/GameHelper.cpp?op=file&rev=0&sc=0 CGameHelper]::GenerateTargets</code>
 
:the damage that would be to the particular candidate unit, for ... rating targets, somehow.
 
:Applicable damage type: <code>damages[(*potential_target)->armorType]</code>.
 
:The function is only called by [http://svn.berlios.de/wsvn/taspring-linux/trunk/rts/Sim/Weapons/Weapon.cpp?op=file&rev=0&sc=0 CWeapon]::SlowUpdate(), probably to look for a nearby enemy to attack. The target rating isn't used.
 
'''Knockback and deformation''':
 
:<code>GameHelper->Explosion</code>
 
:impulse and crater-making
 
:default damage: <code>damages[0]</code>.
 
:Currently: ''Default'' damage is used to calculate knockback, and impulsefactor is a multiplier; a weapon that does no damage can never knock things around, and can never produce craters.

Latest revision as of 03:34, 15 June 2008

Hmm, new scripting language, eh?

A lot of what's given here is ... "structurally sensitive"? Specifically, I get the impression Zaphod would like to delay some feature additions until a new scripting language arrives (and Argh might agree, I think). More generally, what's the easy fix or implementation might not be the best structurally (even before the level of finding some weird replacement for COB).

Implementing a change is easy. Doing it right, particularly in the eyes of the admins, is another matter.

Meben's Code Parade

You know when they say "Use the Source, Luke"? It's a suprising amount of work - and that's for someone who can almost read C++. Many times, when someone adds a bug in Mantis or posts in the forums, I read the code closely and try and find the relevant bits. I figured since I write it down, I might as well write it down where I can find it again, and where someone else might find it useful.

Rules: don't touch the lobby client, no snide commentary. Just code references.

(WebSVN doesn't give per-line anchors. So much for code references.)

=== #00048: Ferromancer: Unit Behavior: Construction units on patrol claim resources when not needed. === (Mantis)

Add a check around CBuilderCAI:452.

=== #00050: Ferromancer: Ground construction units attempt to repair air units while in flight === (Mantis)

I think CMD_PATROL is a point rather than a path. (And why does it push a copy of itself?) (And it's been that way since ancient SF CVS.) (Oh, and deque semantics are a pain - the docs don't define them very well. I hope commandQue.push_front(co) means commandQue[0] == co ...) [TODO Whoever made templated network messages can start on commands now. :P]

I'd still need to figure out how to tell if the current repair job is the fault of a patrol command, and how to abort it.

The policy question is how and when the con-bot decides to give up on the air unit and do something else. (How far is 'too far' from the patrol position?)


=== #00052: Bug Hunter: Units acknoledge enemy "bugger of" === (Mantis)

Perhaps Bug Hunter picked the phrase "bugger off" because that's what it's called in code. You can even do it from COB.

If you couldn't, I'd just get helper->BuggerOff to check team or ally relationships (or whatever it is). But for all I know, units only clear factory buildpads because the factory script asks them to.

---

ColCheckH and ColCheckV in groundmovetype.cpp tell fellow ground-pounders to get out of the way on close collision. I'd guess this is the code that prevents anyone ever making a nice neat line of units. =) Including, in this case, the enemy. Unfortunately, the rest of the file, at a glance, looks like Spring's ever-fragile ground pather.

=== #00066: Argh: S3O Explosion Behavior === (Mantis)

It shouldn't be impossible to let s3o pieces explode without SHATTER. Making s3os shatterable would take a little longer since we've got arrays of verticies rather than 3do-style faces.

However, in Feb. 2006, someone said something about writing a model-type abstraction that would include Ogre meshes, whatever those are. Again in March, someone's tinkering with unit textures.

=== #00068: Argh: Behavior of FALL scripting event === (Mantis)

Unfortunately, I don't have the source for the AA Vulcan, which features ejecting cases.

There's an ancient note that all such fragments must FALL otherwise they'll never go away.

I'd have to fire up OTA to get the correct behaviour.

(PieceProjectiles do exactly 50 damage.)

=== #00105: FizWizz: FPS aiming === (Mantis)

Here's one for the compiler trivia books. The (original) GetHAndPFromVector (in myMath.h - WebSVN doesn't like links across file moves) crashed in one quarter (under Linux only!). However, I bet the call to COBFN_AimPrimary in CWeapon::Update was working fine, despite using similar code, and probably wanting the same results.

Commenting out the code to ask the FPU to choke immediately probably made it exhibit something like the current behaviour, I can't remember.

(Called at the top of Game/Game.cpp::Update.)

GetHAndPFromVector is only used in one place, for the direct-control stuff.

=== #00116: NOiZE: Cloakcosts are doubled === (Mantis)

Metal generation, energy use and idle regeneration are handled in CUnit::SlowUpdate().

Metal and energy gain and a couple of other per-unit-time values are divided in half in there, but the cloak energy cost isn't.

You can even see the 'half-cost' of things when you, say, turn a metalmaker, or a cloak, on or off.

=== #00118: Argh: Feature Request: "Free Interceptor" behavior. === (Mantis)

How they work now

The base Weapon inherit like it's willing to point any weapon at an incoming projectile (::CheckIntercept, called by CWeapon::Update). There's even a couple of interceptor-specific checks in it. However, only Starburst-type indirect-fire missiles have the right callbacks for being both interceptable and interceptors.

CStarburstLauncher::Fire tells CInterceptHandler about the new projectile, if it's weaponDef->targetable.

Only CStarburstProjectile takes an interceptTarget. In its ::Update, it checks if the nuke is 'close'. If so, it tells first the nuke then itself that they've hit something, which makes both of them blow up (helper->Explosion).

(It looks like the reason why the nuke's airburst doesn't do significant damage is because, on Small Divide, they travel higher than aircraft.)

Unpinning the behaviour

I haven't tried it, but it would be relatively easy to have an anti-nuke, say, Vulcan. (... It's the only salvoing unit who's projectile class I've looked up.)

  • (Might need to change CWeapon::Update()'s call to CheckIntercept() to wait until the salvo ends, so the entire salvo points at the nuke. I haven't tested this.)
  • Add the interceptTarget argument to CCannon and parameter to CExplosiveProjectile.
  • Copy the range-to-nuke check to CExplosiveProjectile::Update() from StarburstProjectile.

This is nice and easy 'cause each interceptor round only needs to check one projectile (probably every frame). This presumes that more nukes than interceptors never happens - if not, then you'll get to see the volley of Vulcan fire take out one nuke, but probably mysteriously fail to destroy the other.

If I want to see a hail of laser fire from the Smasher completely defuse a volley from the Raven, I'd have a problem. Either:

  • I do it the simple way and have every interceptor check every interceptable. I'd guess it'd be bad for performance. (Mustn't forget to check the ally-teams of the projectiles. ... Wait, they don't have any. :S)
  • Someone who understands how the QuadField works extends it (re-fac-tor!) to record interceptable projectiles. Sadly, it mentions SQUARE_SIZE, which is my current cue to find some other aspect of Spring to read.

#000119: Argh: Feature Request: "Free Repulsor".

Note: The beam laser projectile does the drawing; you'll find the damage ("explosion"!) is done when the weapon ::Fire()s.

If I pin down the math for a ray reflection, it'll get used two different ways in two places; once in the reflector to give laser bolts a new heading, and again in BeamLaser to bounce off repulsors (with an extra projectile per reflection) 'till something gets hit.

=== #000123: Decimator: Laser weapons will not even attempt to shoot through trees === (Mantis)

... and have done so since SF CVS day dot (BeamLaser.cpp).

One, two, skip a few...

Unit Target DT? Trees? Weapon's class Call responsible
Annihilator CBeamLaser helper->LineFeatureCol
Ambusher X X CCannon
Rocko X X CMissileLauncher
Raven X X
HLT CLaserCannon helper->LineFeatureCol
Defender X X CMissileLauncher
Merl X X CStarburstLauncher
Zeus CLightningCannon helper->LineFeatureCol
Maverick ? X

I think there's an MTR somewhere here, but I'm not entirely sure what it is.


Unit sounds and position

Something only occasionally noted is that individual unit-selected sounds play where the unit is, so if you're zoomed out or off-screen, you can't hear them.

(MTR! *ahem* Maybe not.)

And some random sound-related posts

Hmm. I could almost sketch out a design for a new "ISound" with these requirements...

  • SetSoundVolume(id, volume) so users can quiet down their artillery
  • PlayUnitNotificationSound(id, unit, volume) so we can toggle between sound at unit and sound at player
  • Some sort of IVolumeCalculator or something, so you can have
    • the cameras setting different sound models: a near-2D sound system, immune to zooming out, for overhead view and an at-camera all-3D sound system for FPS-type views, see the above threads.
    • Not to mention the different functions and fudge factors for how the volumes fall off with location.
  • Perhaps add a sound priority (int) to all the PlaySounds so the LLTs don't replace the Vulcans' sounds, or possibly vice versa. Currently, the OpenAL system has a ring-buffer of 16 simultaneous sounds, maybe. I haven't looked at that too closely...
  • A mute(bool) method.

=== Zero Damage === (Mantis: 1, 2)

(Damage and health are floats! For the sake of players, please assume Spring will only ever show whole-number amounts... In any case, this means you only need ridiculous amounts of smallarms fire to significantly damage a tank.)

Issues (so far...):

Explosion graphics:

CStdExplosionGraphics
inverse square root, for smoke particle velocity
default damage: damages[0].
Should 0 default damage produce a Peewee-sized smokepuff, or nothing at all?

Unsupervised target choice:

CGameHelper::GenerateTargets
the damage that would be to the particular candidate unit, for ... rating targets, somehow.
Applicable damage type: damages[(*potential_target)->armorType].
The function is only called by CWeapon::SlowUpdate(), probably to look for a nearby enemy to attack. The target rating isn't used.

Knockback and deformation:

GameHelper->Explosion
impulse and crater-making
default damage: damages[0].
Currently: Default damage is used to calculate knockback, and impulsefactor is a multiplier; a weapon that does no damage can never knock things around, and can never produce craters.