4297 Commits

Author SHA1 Message Date
Chris Morris
2e913bdf8b PlayerEntity needs a different implementation of applyAttitudeChanges for docking computer to work
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5014 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-16 16:30:08 +00:00
Nikos Barkas
43a5ed735a Removed 'static' from array declarators to keep GCC happy.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5013 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-16 12:59:17 +00:00
Chris Morris
000ff5c546 Remove debug lines mistakenly left in last commit
Add 'alertCondition' as an NPC shader property


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5012 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-16 12:01:17 +00:00
Chris Morris
54eb42ab18 Make defenseTargets use weakrefs rather than universalIDs
(neater approach, and shouldn't give return of the zombie ships)


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5011 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-16 11:52:21 +00:00
Jens Ayton
899d9e42b6 Gave myself top billing. (But no I want to implement kerning.)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5010 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-15 21:49:04 +00:00
Jens Ayton
8038a9cdab Support 4-component vectors as uniform values.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5009 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-15 21:38:22 +00:00
Nikos Barkas
7dbe836cc2 Indentation fix.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5008 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-15 09:37:58 +00:00
Nikos Barkas
ed0505d6f1 Tentative fix for galactic jump error occuring on SDL builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5007 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-15 09:25:06 +00:00
Chris Morris
3baa20eedc Non-awful AIs will not fire a normal missile if there are ECM pulses happening right now.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5006 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-12 20:10:01 +00:00
Jens Ayton
bc5fa3600d Changed "(pedantic mode)" to "(strict mode)" in console error reporting, because the JSREPORT_STRICT flag is used for both SpiderMonkey "strict mode" and ES5 strict mode.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5005 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-11 20:46:23 +00:00
Chris Morris
377c7ff5a6 Fix crash bug found by Eric in evasiveAction
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5004 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-11 20:26:53 +00:00
Chris Morris
48e2a103bb weaponRecoveryTime (for shaders, mimics 1.76 laserHeatLevel behaviour for NPCs)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5003 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-11 19:17:30 +00:00
Eric Walch
7d8b4ff4c4 - Fixed bug introduced in r4996. Ships/containers now initialise to have 'undefined' cargo instead of using 0 (meaning food)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5002 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-10 21:43:15 +00:00
Jens Ayton
bc38ee7621 Disabled half-baked material synthesizer.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5001 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-10 17:09:03 +00:00
Chris Morris
cd80d23364 Accuracy read-only for playership
Accuracy JS changes clamped to 0-10 for missiles


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5000 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-10 10:30:53 +00:00
Chris Morris
6a02022727 Add extra bright_fraction parameter to flasher subentities.
0.0-1.0, fraction of cycle flasher is in bright state. Old behaviour (and default setting) is 0.5


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4999 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-09 10:03:46 +00:00
Nikos Barkas
d833c9fb31 Small typo fix.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4998 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-08 17:20:13 +00:00
Chris Morris
dd9962503d Avoid calling malloc(0) on empty models. More testing needed to see if this fixes the problem.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4997 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-08 17:16:09 +00:00
Eric Walch
64b4e4b1de - The 'isCargo' property now detects script added splinters and uncontrolled tharglets now correctly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4996 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-08 13:54:30 +00:00
Chris Morris
93e915cb91 Adjust defense target storage; may be cause of zombies
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4995 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-08 13:01:20 +00:00
Chris Morris
dacd49565d Remove evasion routine which didn't work that well.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4994 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-08 11:47:36 +00:00
Chris Morris
d3541d3cf5 Close-range dogfighting behaviour for high accuracy ships
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4993 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-08 11:08:23 +00:00
Jens Ayton
3f217583dd Comment inaccuracy.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4992 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-06 22:46:06 +00:00
Chris Morris
bdb46f71d5 Initialise weaponRange correctly for ships with only subent forward weapons
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4991 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-06 21:37:36 +00:00
Chris Morris
4623cad7d1 Set weaponRange to WEAPON_PLASMA_CANNON for ships only armed with plasma turrets. (Not necessarily exactly right, but much better than WEAPON_NONE)
Adjust behaviour a little when attacking a fleeing opponent.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4990 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-06 17:42:23 +00:00
Chris Morris
9f22081e2b Wormholes:
- set wormhole exit speed to 25% max ship speed
- add small perpendicular displacement to ships following the leader
- special case treatment where player is both following and being followed
- activate Eric's wormhole positioning code now it is safe to do so

AI:
- fix bug in stick refactoring causing problems with pitch and missile tracking
- tone down in-combat injector usage (fleeing still at full speed)
- tune "back off for another attack run" behaviour
- increase general laser accuracy for combat (though still not as high as 1.76, to compensate for overheating changes)
- apply SIX and TWELVE behaviour to bad pilots not good pilots
- make sure the Constrictor always has positive accuracy 0-5


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4989 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-06 10:02:31 +00:00
getafix
d7e9ebebc4 Fixed linux compilation repetitive warning.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4988 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-06 07:50:17 +00:00
Chris Morris
c5944ddeef Remove unfinished code from last commit
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4987 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-05 18:54:41 +00:00
Chris Morris
e4610b86c0 Remove debugging lines from last commit
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4986 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-05 18:53:25 +00:00
Chris Morris
2837bb87b6 Wormhole exit speed fixed per wormhole (all to the same value for now)
Sniper behaviour usable by high accuracy ships with long-range weapons


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4985 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-05 18:42:19 +00:00
Eric Walch
5b71081865 - fixed a mac compiler error
- restricted 'performMining' to be used on rocks only. 

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4984 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-05 16:09:31 +00:00
Chris Morris
981b57aaf8 Fix witchspace exit speed (constant 0.05LM rather than dependent on ship)
Slightly better handling of overheating lasers


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4983 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-05 11:21:55 +00:00
Chris Morris
e245e12df6 Fix compiler warning in last commit
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4982 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-05 10:34:00 +00:00
Chris Morris
6b3af405e9 Refactor roll/pitch/yaw application
- set stick_roll rather than flightRoll (yaw, pitch) in flight routines
 - use single applySticks function to replace copy/paste code in other routines for stick -> actual translations
 - use simpler applyAttitudeChanges function to simplify repeated calculation
(This is probably not entirely bug free yet)


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4981 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-05 10:05:58 +00:00
Nikos Barkas
4daccfad80 Made the station entity property hasShipyard visible to JS (read-only).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4980 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-03 20:07:59 +00:00
Chris Morris
5a1f91bbf0 Improvements to evasive action behaviour esp. for high-accuracy AIs
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4979 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-03 11:31:13 +00:00
Chris Morris
0003984eaf Correctly update and monitor laser temp for subentities
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4978 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-02 10:55:20 +00:00
Chris Morris
1264ea8ae2 More AI adjustments
- some basic evasive action for smart ships
- adjust attack pattern selection


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4976 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-31 20:31:11 +00:00
Chris Morris
b0be15eeb3 More AI updates:
- NPCs with multiple weapons will account for overheated lasers
- Refactor attack style selection routine
- Reserve three advanced attack styles for later implementation
- Raise default missile load time for non-awful pilots (shipdata can override)
- Make NPCs slightly less accurate with aft and a bit more less accurate with side lasers
Balancing seems vaguely right for core ships, but needs more testing


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4975 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-30 21:50:22 +00:00
Chris Morris
d52c90e646 Experimental - adjust NPC combat AI behaviour.:
- https://developer.berlios.de/pm/task.php?func=detailtask&project_task_id=3832&group_id=3577&group_project_id=1753 - move laser overheating into ShipEntity.
- This actually gives NPCs more laser shots than before, especially with a mil laser, so adjust their accuracy downwards, and make them, like the player, potentially able to waste shots.
- to match the documentation, make -5 to +10 the range for non-missile accuracy
- re-do the baselines so that 0 is average, and -5 to +5 can be picked randomly for NPCs without a shipdata accuracy. +5.1 to +10 must be specified explicitly in the shipdata
- this allows various "better" combat AIs to be set up for special ships without affecting or unbalancing normal play
- tie some other combat AI skill parameters to accuracy variable
- and make ship.accuracy a read/write JS property


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4974 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-29 21:07:00 +00:00
Eric Walch
4ecfa2e8fd - Fixed a compiler error on the mac.
- Upped the renovation cost a bit. It is still cheaper as before when doing it immediately, but raises till higher values as originally when postponing it.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4973 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-29 20:47:42 +00:00
Eric Walch
8b398152b9 - corrected a formatting from my r4967 change
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4971 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-28 08:09:53 +00:00
Chris Morris
a377e485e3 Bounty handling:
- move more things to use setBounty
 - Thargoid bounty now unaffected by most things that affect bounties
entityPersonality:
 - set explicit with player.replaceShip(key [,personality])
 - set explicit with modelPersonality key in mission.runScreen
 - use 'accuracy' instead in some AI combat behaviours



git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4968 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-27 20:23:41 +00:00
Eric Walch
5f3e112511 - Rounded the ship trade-in value as per suggestion by Capt Murphy
- Ship renovation costs now takes the ship wear level into account.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4967 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-27 19:14:22 +00:00
Jens Ayton
8e342317fe Fixed some out-of-date version and copyright strings.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4965 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-27 16:33:21 +00:00
Chris Morris
a570737bee Experimental: make scanClass read/write for NPC ShipEntity only
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4964 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-26 17:13:28 +00:00
Chris Morris
86b2bdbbc7 Fix bug where ships chasing the player could be tricked into standing back outside their own weapon range.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4963 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-26 15:49:59 +00:00
Eric Walch
37efdafb0d - All none-carrier stations now have active npcTraffic as default and not only rotating stations.
- All role-scanning and merchantman-scanning AI commands now omit cloaked ships.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4962 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-26 14:51:59 +00:00
Chris Morris
808f1204c4 Adjust use of accuracy so allowed range for non-missiles is -5 to +10 as documented
Use accuracy (or derived pitch_tolerance) in the various "how skilled is the pilot" calculations rather than entityPersonality.
Make ships with a higher accuracy slightly more accurate shots


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4961 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-26 13:24:36 +00:00
Nikos Barkas
aa37e922e9 Fixed build breakage and a warning.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4960 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-26 10:30:23 +00:00