scrawl
a699b4128a
Add isInCell checks to PlaceAt and PlaceItem ( Fixes #2873 )
...
Avoids the game crashing when a script calls these functions before the player has been moved to the starting location.
2015-12-09 00:49:50 +01:00
scrawl
45a609bc54
Improve PositionCell warning message
2015-12-06 22:37:04 +01:00
scrawl
62169a7039
Use a single-precision PositionAttitudeTransform in speed critical places
2015-11-22 19:54:26 +01:00
Emmanuel Anne
af7b5e636e
improves InterpreterContext::updatePtr
...
This checks the update is really on the right pointer. It fixes the boat
disappearing in "fishing academy", and it allows scripts linked to objects
not to loose their default reference when using the object-> notation on
another object.
2015-11-12 17:53:17 +01:00
scrawl
19cd987208
Fix Ptr updates in PositionCell
...
This was not the proper way to get the updated Ptr, it will only work for the player which isn't owned by any cell. For other objects, moving between cells makes the object owned by that cell and thus the getBase() pointer will change.
2015-11-12 14:32:39 +01:00
scrawl
90b6fa5ef1
PlaceItem, PlaceItemCell angle should be treated as degrees ( Fixes #3007 )
2015-11-12 01:44:29 +01:00
scrawl
b4ce73f179
Rotations: remove LocalRotation
...
This never existed in vanilla MW in the first place. The reason we got confused was because of a strange behaviour where the order of applying rotations changes as soon as a script touches the object's rotation.
2015-11-12 01:16:37 +01:00
scrawl
666fbba1e0
Rotations: World::rotateObject takes radians instead of degrees
...
Cuts down on the amount of redundant degree<->radians conversions in the codebase.
2015-11-12 01:09:39 +01:00
dteviot
77a1d947cc
extracted MWMechanics::getPlayer()
2015-08-21 21:12:39 +12:00
scrawl
4bb3cbf0fb
Remove last remains of Ogre
2015-06-03 23:04:35 +02:00
scrawl
b70383d127
Remove last remains of Ogre math
2015-06-03 21:37:21 +02:00
scrawl
22f01b1232
Merge branch 'master' of https://github.com/OpenMW/openmw into osg
...
Conflicts:
apps/launcher/graphicspage.cpp
apps/opencs/editor.cpp
apps/opencs/model/doc/document.cpp
apps/opencs/view/render/cell.cpp
apps/opencs/view/render/mousestate.cpp
apps/opencs/view/render/textoverlay.cpp
apps/opencs/view/render/worldspacewidget.cpp
apps/openmw/mwclass/creature.cpp
apps/openmw/mwclass/npc.cpp
apps/openmw/mwgui/inventorywindow.cpp
apps/openmw/mwgui/loadingscreen.cpp
apps/openmw/mwgui/mapwindow.cpp
apps/openmw/mwgui/pickpocketitemmodel.cpp
apps/openmw/mwgui/waitdialog.cpp
apps/openmw/mwmechanics/combat.cpp
apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
apps/openmw/mwrender/globalmap.cpp
apps/openmw/mwworld/physicssystem.cpp
apps/openmw/mwworld/refdata.cpp
apps/openmw/mwworld/scene.cpp
apps/openmw/mwworld/worldimp.cpp
components/sdlutil/sdlinputwrapper.cpp
extern/shiny/Main/Factory.cpp
extern/shiny/Main/MaterialInstance.cpp
extern/shiny/Main/Platform.cpp
extern/shiny/Main/ShaderSet.cpp
2015-05-23 20:33:44 +02:00
scrawl
8bcfac1ea3
Fix adjustPosition not always working correctly ( Fixes #2563 )
...
moveObject was returning an incorrect Ptr for cell movements.
2015-05-17 18:16:42 +02:00
scrawl
7a3bc69df7
Readded sound listener
2015-05-12 19:02:56 +02:00
scrawl
c92592493e
OpenMW: create a window and render the starting cell(s)
2015-04-12 15:38:30 +02:00
scrawl
3879ce6ac1
Get rid of "player" string checks ( Fixes #2216 )
2015-03-11 23:07:39 +01:00
dteviot
e197f5318b
fixing MSVC 2013 warning C4244: & C4305
...
conversion from 'const float' to 'int', possible loss of data
conversion from 'double' to 'int', possible loss of data
conversion from 'float' to 'int', possible loss of data
2015-03-08 13:07:29 +13:00
Scott Howard
d01e8cc97d
PositionCell/PlaceItemCell: add console message if cell doesn't exist
2015-03-03 17:36:22 -05:00
Scott Howard
53213bf236
if cell doesn't exist, PositionCell and PlaceItemCell warn std::err but still execute, bug #2407
2015-03-02 11:53:59 -05:00
Alexander "Ace" Olofsson
fce404acc5
Remove some including of mwbase/world.hpp
...
Since ref.hpp is rather well used in OpenMW-CS this should help compile times there
2015-02-09 17:45:48 +01:00
Alexander "Ace" Olofsson
df5a08b6de
Move manualref code out of header
2015-02-09 15:01:49 +01:00
scrawl
6ea59c93ab
Ignore the object scale in Move instruction ( Fixes #2275 )
2015-02-05 04:18:42 +01:00
scrawl
7d76f1a113
PlaceAt count argument should spawn independent references ( Fixes #2283 )
2015-01-31 22:40:41 +01:00
scrawl
0a2dd4c6cb
Fix unsafe use of BaseNode in Move script instruction
2014-12-27 17:20:37 +01:00
scrawl
2601b26217
Merge branch 'master' of https://github.com/OpenMW/openmw
2014-12-11 22:44:58 +01:00
scrawl
7892ed35f3
PlaceItem, PlaceItemCell: Make sure references are placed above terrain (Bug #2078 )
2014-12-11 22:25:53 +01:00
scrawl
7e8ca3fff1
Fix object movement between cells producing a stale Ptr within the script execution (Bug #1942 )
2014-12-11 19:29:06 +01:00
scrawl
b9d0552166
Fix positionCell rotation argument when used on the player
...
This fixes the player's initial orientation on the starting boat, to properly face Jiub.
2014-12-01 23:09:47 +01:00
scrawl
628600a0a5
Make PlaceItem place the item in the player's current worldspace
2014-09-08 23:57:16 +02:00
scrawl
267cf4e140
Implement ResetActors script instruction ( Fixes #1859 )
2014-08-30 18:27:32 +02:00
scrawl
36ba56d037
Make Position instruction move non-player actors within their cell only ( Fixes #1791 )
2014-08-11 02:01:20 +02:00
scrawl
b58b8c6f8f
Adjust player position to ground when using a door marker, even if the player is levitating ( Fixes #1737 )
2014-07-31 04:28:02 +02:00
scrawl
0704fa2b3d
Reset local rotation axis in SetAngle ( Fixes #1630 )
2014-07-09 10:23:01 +02:00
scrawl
ad0a182b7e
Improve error message for unknown cells
2014-06-19 20:08:53 +02:00
scrawl
395f98e476
Fix triggering changed flag for all references when cell is visited
...
The InsertFunctor for cells was calling localRotateObject() for all references which set the mChanged flag in RefData to true.
Also clean up RefData interface slightly.
2014-06-15 14:18:16 +02:00
scrawl
039398c8ae
Basic RefData and CellRef change tracking
...
Wrapped item charge handling in getItemHealth function
2014-05-25 14:30:07 +02:00
Emanuel Guevel
1e4a854433
Remove static method MWWorld::Class::get(&Ptr)
...
It was just adding a level of indirection to Ptr.getClass().
All the call were replaced by that instead. The number of lines changed
is important, but the change itself is trivial, so everything should be
fine. :)
2014-05-22 20:50:00 +02:00
scrawl
6bd0bbb8df
Do not load (0,0) on new game
2014-05-19 14:09:16 +02:00
slothlife
f33559fead
Fixes for MSVC warnings, less overall changes
...
Kept some fixes from the first round of review. Found out that several
targets weren't being built with the same basic warnings disabled.
Disabled a few warnings for external libraries specifically, rather than
applying them to all targets.
2014-05-14 20:12:52 -05:00
slothlife
c160a04ede
Revert "Fixes for warnings when building with MSVC"
...
This reverts commit 46eb20b98c
.
2014-05-14 00:03:30 -05:00
slothlife
46eb20b98c
Fixes for warnings when building with MSVC
...
Most warnings are innocuous (wrong type-specifier for forward
declarations, conversion of literals into unsigned integers, warnings
about methods optimized out), but I believe actual bugs were revealed in
vartypedelegate.cpp and combat.cpp.
2014-05-09 08:32:52 -05:00
cc9cii
b2e3fa70c2
Fix spelling errors in comments.
2014-03-14 07:04:39 +11:00
scrawl
12de0afb03
Feature #50 : Spawn projectiles
...
Fix a bug in copyObjectToCell.
Make actor rotations more consistent.
2014-03-08 01:31:27 +01:00
scrawl
d0500e8124
Some unneeded includes cleanup
2014-01-15 14:53:28 +01:00
scrawl
098f9712f1
Add getPlayerPtr() utility method. Reduces dependencies a lot.
2014-01-08 18:39:44 +01:00
scrawl
c558e12212
Don't try to move objects that are not in a cell
2014-01-02 03:06:48 +01:00
Lukasz Gromanowski
e9844e1b37
Fixes #417 : Apply weather instantly when teleporting
...
Changed teleporting detection from "position tracking" to manually
setting "teleportation" flag ( player->setTeleported(true) ).
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-31 20:40:23 +01:00
scrawl
bb4bd999ba
PlaceAt: Copy the rotation when placing a non-actor. Don't modify placement position by bounding box for non-actors. Fixes placement in Graphic Herbalism mod.
2013-11-30 08:29:22 +01:00
Emanuel Guevel
aefa54d72d
Pass item count to ManualRef constructor
...
This remove the need to call setCount in multiple places.
2013-11-10 02:45:16 +01:00
Emanuel Guevel
f4f2586e8c
Remove duplicate code for PlaceAtMe/PlaceAtPC using a template
2013-11-10 02:45:16 +01:00
Alex
de1f423bd7
initial move of script opcodes and registerExtensions functions to components/compiler
2013-08-06 20:38:41 -04:00
scrawl
5063d90dda
GetStartingAngle was implemented, but not registered
2013-05-01 11:22:46 +02:00
scrawl
627c3fdb6b
Added GetStandingPC, GetStandingActor; Fixed GetStartingPos
2013-05-01 11:15:43 +02:00
Glorf
89f7ef2472
Move, moveworld script instructions
2013-04-26 17:28:19 +02:00
scrawl
a373f53988
Added SetAtStart
2013-04-26 02:02:51 +02:00
Glorf
7cd4dd0c91
Improved local rotations
2013-04-25 19:14:10 +02:00
Glorf
53fb17da10
Rotation system fixes
2013-04-24 21:42:04 +02:00
Glorf
e3a9f73eb6
Improved getangle script behaviour
2013-04-16 21:40:34 +02:00
Glorf
1e92ffc314
Added rotation layer
2013-04-16 21:17:19 +02:00
Glorf
763308868d
Fixed rotation speed
2013-04-15 17:45:18 +02:00
Glorf
972481f63f
Working rotate, rotateworld
2013-04-15 16:45:53 +02:00
Glorf
4e0233cf06
Base local rotations implementation
2013-04-14 21:42:37 +02:00
Glorf
106ef4c936
Rotate script
2013-04-10 22:53:03 +02:00
scrawl
1f3df4df0f
Perform a sanity check on count arguments
2013-04-06 19:25:29 +02:00
scrawl
2e7d5377f4
Fix crash when moving npcs to an inactive cell
2013-04-04 16:51:22 +02:00
scrawl
ebaf80d539
Trace actors onto the ground after load, when moved to a different cell by the console or on player cell change.
2013-04-03 23:55:57 +02:00
gus
3384d92761
oups introduced a bug..
2013-03-04 12:28:43 +00:00
gus
5951abfae2
fix some script instructions
2013-03-03 13:59:38 +00:00
scrawl
d6dd212ce8
GetWerewolfKills, ModScale, SetDelete, GetSquareRoot
2012-11-27 06:54:13 +01:00
greye
2057f5619e
move ESMStore to MWWorld
2012-11-05 17:18:01 +04:00
greye
2fa4ac177a
initial resolving
2012-10-01 00:23:49 +04:00
greye
18cc435aa1
resolving conflicts
2012-09-21 13:13:11 +04:00
Marc Zinnschlag
ede9a2b170
fixed an orientation problem
2012-09-19 19:56:02 +02:00
Marc Zinnschlag
fcda3b6ca8
fixed some script argument types
2012-09-18 11:09:54 +02:00
Marc Zinnschlag
ea8eab4f34
more cleanup
2012-09-18 11:06:19 +02:00
Marc Zinnschlag
408c5b8bd4
some cleanup
2012-09-18 10:49:51 +02:00
Marc Zinnschlag
4469976be9
Merge remote-tracking branch 'gus/object_movement_creation' into object_movement_creation
...
Conflicts:
apps/openmw/mwscript/docs/vmformat.txt
2012-09-18 10:44:25 +02:00
gugus
3c1a9061de
Fixed a bug of Ptr having a wrong orientation. But that's strange, seems CellRef isn't initialized properly
2012-09-17 14:12:27 +02:00
gugus
032ff7c879
Clean-up. There is still a little bug.
2012-09-17 13:36:48 +02:00
greye
7606ebafd6
resolving conflicts, minor update
2012-09-17 11:37:50 +04:00
gugus
fa9f2b268b
PlaceItem,PlaceItemCell,PlaceAtPC,PlaceAtMe
2012-09-02 17:57:03 +02:00
gugus
f2d080d091
bugfix
2012-08-18 10:50:58 +02:00
gugus
fb91f76a2b
fixed a crash
2012-08-11 22:08:04 +02:00
gugus
0c8045d606
allow exterior cell for positioncell. Crash!
2012-08-11 19:16:00 +02:00
gugus
0bc48cc5ea
little fix (thanks greye!)
2012-08-11 18:07:20 +02:00
gugus
eaf6a8df94
some correction
2012-08-11 14:06:58 +02:00
gugus
7fa1dc93d7
2nd try: position/ PositionCell
2012-08-11 09:52:49 +02:00
gugus
b664b174f0
Merge branch 'master' of https://github.com/zinnschlag/openmw.git into object_movement_creation
...
Conflicts:
apps/openmw/mwscript/transformationextensions.cpp
2012-08-09 23:50:44 +02:00
gugus
cb5b69104d
PositionCell
2012-08-09 23:45:06 +02:00
gugus
8a485e213b
first try of the Position script instruction. Still missing: check if overlapp with an object.
2012-08-05 16:44:56 +02:00
gugus
d850a3ee49
some correction
2012-08-05 16:21:53 +02:00
Marc Zinnschlag
e4dc01832b
fixing object rotation script instructions (wrong argument type and missing error handling)
2012-08-04 09:18:20 +02:00
gugus
b2ce1dfd1a
getStartingPos
2012-08-03 18:20:51 +02:00
gugus
7d6ad6ad94
setPos and getPos Script instructions. Cell-crossing is not tested yet.
2012-08-03 18:14:05 +02:00
Marc Zinnschlag
c251fbdf23
Merge branch 'master' into HEAD
...
Conflicts:
apps/openmw/mwscript/docs/vmformat.txt
libs/openengine/ogre/renderer.cpp
2012-08-02 14:57:35 +02:00
gugus
ebd8b064f6
getStartingAngle script instruction
2012-08-01 12:21:42 +02:00
gugus
410b693555
setAngle improvement
2012-07-10 11:15:46 +02:00
gugus
557e114992
clean-up + getScale/Angle script instructions
2012-07-09 19:28:44 +02:00
gugus
0a67f60a6e
Clean-up
2012-07-09 18:47:59 +02:00