Permalink
Browse files

onUse, onShot return bool, EVENT_SWIM_SUBMERGED

- ozCore
  * Time::epoch field removed
- matrix
  * onShot can also fail now
  * onUse and onShot hadlers should return boolean to indicate success
  * submerged swimming event
- client
  * rendering order fixed, sea uderwater fog fixed
  * direction keys fixed in UI mode
  • Loading branch information...
1 parent 57079c7 commit 8c7ea5aea3eafc2629b2d2032c8d2a2ef868511c @ducakar committed Feb 13, 2013
Showing with 261 additions and 245 deletions.
  1. +3 −4 CMakeLists.txt
  2. +3 −7 README.md
  3. +0 −1 TODO.md
  4. +1 −1 data/oz_main/class/bauul.json
  5. +1 −1 data/oz_main/class/beast.json
  6. +1 −1 data/oz_main/class/cvicek.json
  7. +1 −1 data/oz_main/class/cyborg.json
  8. +1 −1 data/oz_main/class/droid.OOM-9.json
  9. +1 −1 data/oz_main/class/droid.json
  10. +1 −1 data/oz_main/class/firstAid.json
  11. +1 −1 data/oz_main/class/goblin.json
  12. +1 −1 data/oz_main/class/knight.json
  13. +1 −1 data/oz_main/class/zombie.json
  14. +11 −5 data/oz_main/lua/matrix/generic.lua
  15. +7 −1 data/oz_main/lua/matrix/handlers.lua
  16. +46 −12 data/oz_main/lua/matrix/weapons.lua
  17. +1 −1 data/oz_main/lua/nirvana/minds.lua
  18. +1 −1 doc/PREBERI.html
  19. +1 −1 doc/README.html
  20. +1 −0 etc/PKGBUILD.aur
  21. +1 −1 etc/SDL2-CMakeLists-gen.sh
  22. +3 −13 run.sh
  23. +12 −10 src/builder/Class.cc
  24. +4 −2 src/client/BotAudio.cc
  25. +6 −8 src/client/Context.cc
  26. +2 −0 src/client/GameStage.cc
  27. +2 −2 src/client/Input.cc
  28. +0 −1 src/client/Lua.cc
  29. +14 −2 src/client/Mesh.cc
  30. +18 −9 src/client/Render.cc
  31. +1 −0 src/client/Render.hh
  32. +3 −2 src/client/ui/CreditsMenu.cc
  33. +10 −8 src/client/ui/Inventory.cc
  34. +7 −9 src/client/ui/Mouse.cc
  35. +2 −1 src/matrix/Bot.hh
  36. +14 −11 src/matrix/Lua.cc
  37. +1 −1 src/matrix/Object.hh
  38. +1 −1 src/matrix/ObjectClass.hh
  39. +5 −7 src/matrix/Weapon.cc
  40. +2 −2 src/matrix/Weapon.hh
  41. +2 −1 src/matrix/luaapi.cc
  42. +0 −14 src/matrix/luaapi.hh
  43. +0 −1 src/nirvana/Lua.cc
  44. +2 −2 src/ozCore/System.cc
  45. +41 −43 src/ozCore/Time.cc
  46. +18 −18 src/ozCore/Time.hh
  47. +5 −5 src/tests/CMakeLists.txt
  48. +0 −20 src/tests/test.cc
  49. +1 −8 src/tools/openzone.cc
View
@@ -138,15 +138,15 @@ if( NOT PLATFORM_EMBEDDED )
mark_as_advanced( FREEIMAGE_LIBRARY )
if( NOT FREEIMAGE_LIBRARY )
- message( FATAL_ERROR "FreeImage library missing" )
+ message( FATAL_ERROR "FreeImage library is missing" )
endif()
if( OZ_NONFREE )
find_library( SQUISH_LIBRARY squish )
mark_as_advanced( SQUISH_LIBRARY )
if( NOT SQUISH_LIBRARY )
- message( FATAL_ERROR "libsquish missing (required by OZ_NONFREE)" )
+ message( FATAL_ERROR "libsquish library is missing (required by OZ_NONFREE)" )
endif()
endif()
endif()
@@ -192,8 +192,7 @@ else()
endif()
set( CMAKE_CXX_FLAGS "${flags} ${CMAKE_CXX_FLAGS}" )
-# set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fdata-sections -ffunction-sections" )
-# set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections" )
+set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-fwhole-program" )
# Strings for BuildInfo class.
string( TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" OZ_CXX_FLAGS )
View
@@ -1,11 +1,9 @@
-OpenZone
-========
-
![logo](http://ducakar.github.com/openzone/img/title.jpg)
-Simple cross-platform FPS/RTS game engine.
+OpenZone
+========
- http://ducakar.github.com/openzone/
+Simple cross-platform FPS/RTS game engine. http://ducakar.github.com/openzone/.
This README file is intended for developers only. See `doc/README.html` if you are an end-user.
@@ -267,8 +265,6 @@ The following alternative launches are available:
archives, HTML pages ...), starts a simple python web server in that directory at port 8000
(`python -m http.server`) and opens `localhost:8000` in chromium browser to test the web-based
NaCl port. If `strip` is passed as the second option, binaries are stripped too.
-- `pnacl`: Same as `nacl` command but create links `.nexe`s that were created from a `.pexe`
- (use `./build.sh pnacl`).
Documentation
-------------
View
@@ -1,6 +1,5 @@
0.4
-- fix random splash event bug
- TalkFrame
- 6-direction-layered meshes
- fix CreditsMenu scrolling
@@ -66,6 +66,6 @@
"death": "ppm/deathb",
"step": "openarena/boot4",
"waterStep": "openarena/splash1",
- "swim": "openarena/watr_in"
+ "swimSurface": "openarena/watr_in"
}
}
@@ -47,6 +47,6 @@
"death": "ppm/deathb",
"step": "openarena/boot4",
"waterStep": "openarena/splash1",
- "swim": "openarena/watr_in"
+ "swimSurface": "openarena/watr_in"
}
}
@@ -30,6 +30,6 @@
"land": "grsites/hit2",
"splash": "free/splash1",
"use": "aard/tak",
- "useFailed": "free/tick"
+ "useFailed": "bfxr/failed"
}
}
@@ -71,6 +71,6 @@
"death": "ppm/deathb",
"step": "openarena/boot4",
"waterStep": "openarena/splash1",
- "swim": "openarena/watr_in"
+ "swimSurface": "openarena/watr_in"
}
}
@@ -63,6 +63,6 @@
"death": "droid-sounds/death2",
"step": "openarena/boot4",
"waterStep": "openarena/splash1",
- "swim": "openarena/watr_in"
+ "swimSurface": "openarena/watr_in"
}
}
@@ -65,6 +65,6 @@
"death": "droid-sounds/death2",
"step": "openarena/boot4",
"waterStep": "openarena/splash1",
- "swim": "openarena/watr_in"
+ "swimSurface": "openarena/watr_in"
}
}
@@ -31,6 +31,6 @@
"land": "grsites/hit2",
"splash": "free/splash1",
"use": "aard/tak",
- "useFailed": "free/tick"
+ "useFailed": "bfxr/failed"
}
}
@@ -63,6 +63,6 @@
"death": "ppm/deathd",
"step": "openarena/boot4",
"waterStep": "openarena/splash1",
- "swim": "openarena/watr_in"
+ "swimSurface": "openarena/watr_in"
}
}
@@ -46,6 +46,6 @@
"death": "ppm/deathb",
"step": "openarena/boot4",
"waterStep": "openarena/splash1",
- "swim": "openarena/watr_in"
+ "swimSurface": "openarena/watr_in"
}
}
@@ -44,6 +44,6 @@
"death": "aard/die1",
"step": "openarena/boot4",
"waterStep": "openarena/splash1",
- "swim": "openarena/watr_in"
+ "swimSurface": "openarena/watr_in"
}
}
@@ -29,23 +29,27 @@ function healUser( l )
ozBindUser()
if ozBotHasState( OZ_BOT_MECHANICAL_BIT ) then
- ozUseFailed()
+ return false
else
ozObjAddLife( 100.0 )
end
+
+ return true
end
function healUser_disposable( l )
ozBindUser()
if ozBotHasState( OZ_BOT_MECHANICAL_BIT ) then
- ozUseFailed()
+ return false
else
ozObjAddLife( 100.0 )
ozBindSelf()
ozObjDestroy( true )
end
+
+ return true
end
function meleeAttack( l )
@@ -54,21 +58,23 @@ function meleeAttack( l )
local pX, pY, pZ = ozObjGetPos()
local vX, vY, vZ = ozBotGetDir()
- ozOrbisBindOverlaps( OZ_OBJECTS_BIT, pX + 0.6*vX, pY + 0.6*vY, pZ + 0.6*vZ, 0.4, 0.4, 0.4 );
+ ozOrbisBindOverlaps( OZ_OBJECTS_BIT, pX + 0.6*vX, pY + 0.6*vY, pZ + 0.6*vZ, 0.4, 0.4, 0.4 )
while ozBindNextObj() do
if not ( ozObjIsSelf() or ozObjIsUser() ) then
ozObjDamage( 100.0 + 50.0 * math.random() )
end
end
+
+ return true
end
function spawnSmallExplosion( l )
- ozOrbisAddObj( OZ_FORCE, "smallExplosion", ozObjGetPos() );
+ ozOrbisAddObj( OZ_FORCE, "smallExplosion", ozObjGetPos() )
end
function spawnBigExplosion( l )
- ozOrbisAddObj( OZ_FORCE, "bigExplosion", ozObjGetPos() );
+ ozOrbisAddObj( OZ_FORCE, "bigExplosion", ozObjGetPos() )
end
function smallExplosion_onUpdate( l )
@@ -29,14 +29,16 @@ function cvicek_onUse( l )
ozBindUser()
if ozBotHasState( OZ_BOT_MECHANICAL_BIT ) then
- ozUseFailed()
+ return false
else
ozObjAddLife( 50 )
ozBotAddStamina( 30 )
ozBindSelf()
ozObjDestroy( true )
end
+
+ return true
end
function bomb_onUse( l )
@@ -47,6 +49,8 @@ function bomb_onUse( l )
l.ticks = nil
ozObjEnableUpdate( false )
end
+
+ return true
end
function bomb_onUpdate( l )
@@ -83,4 +87,6 @@ function serviceStation_onUse( l )
ozVehicleService()
end
end
+
+ return true
end
Oops, something went wrong.

0 comments on commit 8c7ea5a

Please sign in to comment.