Forums » General

Is this a design flaw?

Feb 11, 2008 blacknet link
There was some dialog a few days ago about an event in VO, PLAYER_DIED, one of the args is the object ID number which the client has no control over possibly ever viewing the object NAME. One side said this was a design flag and possible security issue, the other side said no it was not and was by design to allow for something. I was wondering what everyone here had to say about this.

Ed
Feb 11, 2008 slime73 link
What are you talking about? You can get object names from ids if you target them.
Feb 12, 2008 blacknet link
not if it's from another ship and you are in another sector BECAUSE YOU DIED. This is arg[3] from PLAYER_DIED. it seems to be the weapon id but there is no way to get any more info from that. with rockets the number changes with each time you fire it.
Feb 13, 2008 raybondo link
It's not an object ID. it is an object type.
It was used to determine the death text to display. Different text for different kills.

You can use it as the third arg for this function which returns a string:
GeneratePlayerDiedMessage(victim_name, killer_name, weaponid)

The third arg to the event is no longer used and may be removed.
Feb 13, 2008 slime73 link
It'd be neat if you change it to the string name, that way a plugin could be made to have custom death messages or save data of things that killed you, etc.
Feb 13, 2008 blacknet link
Ok so it's not a design flaw but depreciated. That helps clear things up.