Time |
Nick |
Message |
00:08 |
|
behalebabo joined #minetest-dev |
00:16 |
|
fluxionary joined #minetest-dev |
01:29 |
|
diceLibrarian joined #minetest-dev |
04:00 |
|
MTDiscord joined #minetest-dev |
05:36 |
|
calcul0n_ joined #minetest-dev |
07:08 |
|
Fleckenstein joined #minetest-dev |
07:17 |
|
appguru joined #minetest-dev |
08:15 |
|
Fixer joined #minetest-dev |
08:37 |
|
cranezhou joined #minetest-dev |
09:04 |
|
Warr1024 joined #minetest-dev |
09:53 |
|
Fleckenstein joined #minetest-dev |
10:09 |
|
Fleckenstein joined #minetest-dev |
10:10 |
|
HuguesRoss joined #minetest-dev |
11:00 |
|
kilbith joined #minetest-dev |
11:12 |
kilbith |
is there any way to get a ServerActiveObject starting from a ISceneNode? |
11:31 |
celeron55 |
no because ISceneNode is a client-side thing and ServerActiveObject is a server-side thing |
11:33 |
kilbith |
I know but I imagined that we could get an ID from ISceneNode and use it from ServerActiveObject |
11:34 |
kilbith |
or there's another way? |
11:55 |
kilbith |
something like: get the ISceneNode's ID -> get an ActiveObject from the server environment |
11:55 |
kilbith |
or there's no relationship at all possible? |
12:14 |
|
appguru joined #minetest-dev |
12:15 |
|
Fleckenstein joined #minetest-dev |
12:18 |
|
cranezhou joined #minetest-dev |
12:41 |
|
Desour joined #minetest-dev |
12:58 |
kilbith |
success: http://codepad.org/9ADd1x70 |
12:59 |
kilbith |
`cam->getSelectedNodeID()` is the ISceneNode's ID |
13:07 |
kilbith |
looks like I've been lucky and getActiveObject actually expects a peer's ID |
13:07 |
|
natewrench joined #minetest-dev |
13:09 |
|
vampirefrog joined #minetest-dev |
13:32 |
kilbith |
Krock: you did talk about shared IDs between client/server, can you tell me more? |
13:54 |
Krock |
kilbith: the server has to update the CAO's position somehow, right? so there's an ID that must match |
13:56 |
Krock |
ClientEnvironment::addActiveObject is what you need to check. there's an "id" parameter which originates from the server |
13:57 |
kilbith |
so I've got this: https://www.youtube.com/watch?v=DsGd1X9RlOE |
13:57 |
Krock |
however, the smoke puff is a bit special. it doesn't have a server ID |
13:57 |
kilbith |
the scene node (= the player) is picked through a raycast made up from the screen coordinates of a mouse click (note: irrlicht modification necessary) |
13:57 |
Krock |
what if it's a touch screen? they could point anywhere |
13:57 |
kilbith |
so basically (in gaming terms) you can left-click a player to select it, right-click to select a position on the map and the player would move to this target (exactly like in a RTS game) |
13:58 |
kilbith |
I'm not handling touch screen (and won't) |
13:58 |
rubenwardy |
Touchscreen fakes a mouse click |
13:58 |
Krock |
rubenwardy: but I believe the selection raycast differs |
13:59 |
rubenwardy |
By faking a mouse click |
13:59 |
rubenwardy |
Basically, it sets the position to where the user taps and emits an event |
13:59 |
Krock |
oh right. the desktop cursor is centered too, so that's at least consistent |
13:59 |
rubenwardy |
The selection raycast differs because the "mouse" position isn't necessarily centered |
14:00 |
rubenwardy |
Also, remember that we support touchscreen on desktop too |
14:01 |
rubenwardy |
Not that you'd want to use it |
14:01 |
rubenwardy |
Also, I imagine with a camera API you might allow unlocking the mouse on desktop too |
14:19 |
kilbith |
Krock: I'm thinking of another way around |
14:19 |
kilbith |
https://github.com/minetest/minetest/blob/master/src/client/content_cao.cpp#L769 |
14:19 |
kilbith |
all CAO are init with an of -1 (the third param (the ID) is always ignored) |
14:20 |
kilbith |
* with an ID of -1 |
14:20 |
kilbith |
so the idea is to add a 3rd param with the peer_id |
14:20 |
kilbith |
so I can get a peer ID from any ISceneNode |
14:27 |
kilbith |
do note that the raycast only can get a ISceneNode since it's in irrlicht |
14:31 |
|
Desour joined #minetest-dev |
14:57 |
kilbith |
so the 3rd param is actually `m_id` and it does work |
15:11 |
|
diceLibrarian joined #minetest-dev |
15:19 |
|
vampirefrog joined #minetest-dev |
16:06 |
|
behalebabo joined #minetest-dev |
16:44 |
|
natewrench joined #minetest-dev |
17:02 |
|
appguru joined #minetest-dev |
17:08 |
|
fluxionary joined #minetest-dev |
17:16 |
celeron55 |
https://github.com/minetest/minetest/pull/12690 |
17:16 |
celeron55 |
i'd like someone to test and confirm that this performs reasonably now |
17:17 |
celeron55 |
i'll clean it up a bit once it does |
17:30 |
|
natewrench joined #minetest-dev |
19:01 |
|
Fleckenstein joined #minetest-dev |
19:12 |
|
fluxionary joined #minetest-dev |
19:39 |
|
fluxionary joined #minetest-dev |
21:02 |
|
Fleckenstein joined #minetest-dev |
21:11 |
|
proller joined #minetest-dev |
22:32 |
|
panwolfram joined #minetest-dev |
23:57 |
|
behalebabo joined #minetest-dev |