Modify

Ticket #66 (closed enhancement: fixed)

Opened 10 years ago

Last modified 9 years ago

re-implement doors/teleporters

Reported by: tZee_parpg Owned by: Kaydeth_parpg
Priority: major Milestone: Techdemo 1
Component: scripts Version: trunk
Keywords: door, teleporter, map, mapchange, game object Cc:
Blocked By: Blocking:
Department:

Description

Problem: We moved the code to the new game objects format. Right now doors and teleporters are not working anymore.

Solution: Add the necessary game object(s), script the teleportation code and add the context menu entry. Additionally add some door objects to the map.

Attachments

teleport_player.patch (19.5 KB) - added by saritor 9 years ago.
This patch puts door objects into the game and implements code to use context menus to initiate a teleport of a player within the currently loaded map.
gamestate_double_hash.patch (3.4 KB) - added by saritor 9 years ago.
Changes Gamestate.objects to a double hash of map ids and then object ids.
gamestate_double_hash.2.patch (3.4 KB) - added by saritor 9 years ago.
Changes Gamestate.objects to a double hash of map ids and then object ids. UPDATED for rev. 313
map_change.2.patch (8.3 KB) - added by kaydeth_parpg 9 years ago.
This patch gets map changing working to and from both maps. However it is mostly a hack to correct the problem with camera name clashes as well as moving the right PC Instance. This needs to be reworked before committed.
map_change.patch (11.7 KB) - added by Saritor 9 years ago.
This patch implements Kaydeth's camera fix as well as a fix for letting us be able to remove the PC entry on individual map files. However the very first map a player starts the game on will need such an entry.

Change History

comment:1 Changed 10 years ago by Kaydeth_parpg

  • Milestone changed from Techdemo 1 to Milestone 1

comment:1 Changed 10 years ago by Kaydeth_parpg

  • Owner changed from parpg to Kaydeth_parpg

assigned to saritor and Cruul

Changed 9 years ago by saritor

This patch puts door objects into the game and implements code to use context menus to initiate a teleport of a player within the currently loaded map.

comment:3 Changed 9 years ago by eliedebrauwer

(In [310]) Ticket #66: Patch by saritor (& eliedebrauwer), implements saritors rework of teleporting, at this point it implements the within-a-map teleport successfully, but cross map teleport still has in issue which probably has to do with the setup of the PC. refs #66

comment:4 Changed 9 years ago by eliedebrauwer

(In [311]) Ticket #66: Forgot to add doors.py refs #66

Changed 9 years ago by saritor

Changes Gamestate.objects to a double hash of map ids and then object ids.

Changed 9 years ago by saritor

Changes Gamestate.objects to a double hash of map ids and then object ids. UPDATED for rev. 313

comment:5 Changed 9 years ago by eliedebrauwer

(In [314]) Ticket #66: Patch by saritor, eliedebrauwer & kaydeth cross map teleporting is now possible, we extended the objects within gamestate to make use of double hashing (f(obj_id,map_id)->object). Going back to a previously loaded map is still broken (camera issue). Also extended map.xml and map2.xml in order to make it possible to go back and forth between these two maps. refs #66

comment:6 Changed 9 years ago by eliedebrauwer

So to reproduce the current issue

  • on map.xml walk through the shanty door
  • on map2.xml walk through the shanty door again

at this point fife segfaults. the segfault is related to addPC in map.py, I already added this workaround:

        if self.cameras['main'].getAttached() == None:
            self.cameras['main'].attach(agent)

i tried detaching/reattaching the camera without success, so now I only add it when it wasn't added before.

comment:7 Changed 9 years ago by eliedebrauwer

(In [315]) Ticket #2: Patch by eliedebrauwer. Performed some cleanup on scripts/common and scripts/objects. refs #66

Changed 9 years ago by kaydeth_parpg

This patch gets map changing working to and from both maps. However it is mostly a hack to correct the problem with camera name clashes as well as moving the right PC Instance. This needs to be reworked before committed.

Changed 9 years ago by Saritor

This patch implements Kaydeth's camera fix as well as a fix for letting us be able to remove the PC entry on individual map files. However the very first map a player starts the game on will need such an entry.

comment:8 Changed 9 years ago by eliedebrauwer

  • Status changed from new to closed
  • Resolution set to fixed

(In [340]) Ticket #66: Patch by Saritor, This patch implements Kaydeth's camera fix as well as a fix for letting us be able to remove the PC entry on individual map files. However the very first map a player starts the game on will need such an entry. closes #66

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.