4378 Commits

Author SHA1 Message Date
Eric Walch
db97576119 - the quantity of scripted cargo is now set to zero when no cargo was defined at the end of the shipWasScooped handler. This to make sure the shipScoopedOther shows correct zero quantities when querying the scooped content.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5046 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-03 10:12:18 +00:00
Chris Morris
c48dfef331 Allow scripts to reposition/reorient the custom view with player.ship.setCustomView(position,orientation).
Separate zero_distance into two variables - one for the player entity, and one for the camera. Stops odd effects when custom viewpoint is a long distance from the player.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5045 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-01 18:47:09 +00:00
Jens Ayton
d07caaff60 Cleanup.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5044 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-30 10:08:31 +00:00
Jens Ayton
6abaf7544f Avoid delay on F7 screen by not drawing planet miniatures when their textures are rendering.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5043 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-29 17:33:53 +00:00
Jens Ayton
b565053e9e Disabled planet texture preloading due to crashes on some Windows systems. See http://www.aegidian.org/bb/viewtopic.php?f=3&t=12109
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5042 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-29 17:31:19 +00:00
Jens Ayton
4b6a56698f Added more instrumentation of texture cache issue.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5041 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-29 09:39:35 +00:00
Chris Morris
e6a0879d54 Remove debug code left in last commit
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5040 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-28 21:33:40 +00:00
Chris Morris
e191c6050f More optimisations in shadow placements
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5039 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-28 20:22:32 +00:00
Eric Walch
3147089b76 - relocated the shipScoopedOther, so that it fires for any pod, not only for those with content that stay in the hold.
- Activated the 'old atmosphere' until we can merge with shady planets, were the new atmosphere does work.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5037 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-28 11:42:00 +00:00
Chris Morris
9447db9ea8 Remove probably unnecessary subentity owner refresh, as nothing appears to change it, and doing it every frame gets expensive
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5036 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-27 22:03:38 +00:00
Chris Morris
3f9eb935b1 More optimisations.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5035 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-26 21:53:42 +00:00
Chris Morris
e7bbc3a552 Profiling suggests these functions are bottlenecks:
- cache subentity bounding boxes for the common case where subentity position+rotation relative to its parent is constant
 - don't bother with the cosmetic exhaust plumes calculation if parent ship is out of visual range
About 25% saving on total Universe update here.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5034 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-26 17:40:43 +00:00
Nikos Barkas
129ffefa0b Added JS ShipEntity methods getMaterials and getShaders. Thanks to Capt. Murphy for providing the code.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5033 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-26 12:01:27 +00:00
Nikos Barkas
7d85d2eb61 JS ship entity setShaders fix by Capt. Murphy
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5032 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-26 09:54:48 +00:00
Eric Walch
aa71c6e703 - Moved the 'shipScoopedOther' event down, so it fires after the cargo script and is already included in the manifest count.
- Exposed 'commodity' and 'commodityCount' to JS as ship property, so a script can determine the cargo content it has scooped from the cargo itself without the need of a new event.
- Removed the now not needed 'shipScoopedCargo' event.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5031 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-25 20:17:43 +00:00
Chris Morris
ebc282ca7e Make Thargoid laser accuracy dependent on ship accuracy. (10 never misses, 0 is previous behavior, accuracy scale is linear)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5030 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-25 19:43:18 +00:00
Jens Ayton
134d5c2411 Removed debug code.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5029 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-24 22:59:46 +00:00
Eric Walch
50a4ba18ea - Renamed the cargoScooped handler to shipScoopedCargo for consistency. (but, do we need it?)
- Cleaned up some missile code.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5028 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-23 15:28:32 +00:00
Chris Morris
362b7b83f8 Fix bug where looking too harshly at an inexperienced pilot would cause them to panic and fly in circles.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5027 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-23 13:31:14 +00:00
Chris Morris
b7b6d4aa66 Adjust bounty and contract reputation if player hitchhikes inside a carrier
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5026 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-23 12:58:46 +00:00
Chris Morris
48997f5039 initialChoicesKey parameter for mission.runScreen
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5025 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-21 20:07:06 +00:00
Chris Morris
ab616ce810 NPC behaviour improvements
- refactor application of turn+thrust to be simpler
 - set max speed for scooping
 - cancel scooping if target is not cargo


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5024 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-21 19:16:59 +00:00
Jens Ayton
8266c8b099 Raised JavaScript heap limit (intended to do it a while ago but forgot).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5023 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-21 06:56:20 +00:00
Chris Morris
8076181697 Misjumps of carriers when the player is docked.
(If the carrier does not have interstellar undocking, this will of course give strange results)


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5022 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-19 18:07:50 +00:00
Chris Morris
61c35b4e59 Improve handling of player being carried through witchspace on board another ship.
Doesn't yet get misjumps by the carrier correct, but normal jumps should work properly.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5021 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-18 21:54:58 +00:00
Nikos Barkas
fbecc5e3ec Ensure keyboard precision is clamped from 0.05 to 1.0 in order to avoid exotic inputs from the user defaults file.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5020 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-18 08:13:34 +00:00
Nikos Barkas
c60eef886c Corrected implementation of key precision, adjusted default factor to 0.5.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5019 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-17 23:21:34 +00:00
Nikos Barkas
cc02830fe7 Experimental keyboard precision mode. Press Ctrl with any of the roll/pitch/yaw controls to activate. Sensitivity factor is user defined in the user defaults file using the key flight-arrow-key-precision-factor, default is 0.75.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5018 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-17 21:27:50 +00:00
Jens Ayton
41cd72d2dd [Mac] Support for Retina display high-resolution gameplay.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5017 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-17 16:23:24 +00:00
Chris Morris
5232a456ba Per Wildeblood's suggestion at http://aegidian.org/bb/viewtopic.php?p=172389#p172389
- HUDs can now define crosshair shapes from external files by crosshair_file
 - player.ship.crosshairs can be used to switch to a different crosshair file without needing a separate HUD file
 - switching HUD reverts to that HUD's default crosshair settings
 - crosshair.plist still used as fallback
 - if HUD specifies both crosshair_file and crosshairs, crosshair_file is used


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5016 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-16 21:28:37 +00:00
Jens Ayton
b7ccf80512 [Mac] Updated game icon and splash screen for retina displays.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5015 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-16 17:51:05 +00:00
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