View Issue Details

IDProjectCategoryView StatusLast Update
0007347Source patchesMulti Theft Auto : San Andreaspublic2013-04-24 09:48
ReporterJusonex Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionno change required 
Summary0007347: Patch for 0006861: Teams members aren't sent to clients if set in onResourceStart
Description

look here: http://bugs.mtasa.com/view.php?id=6861

TagsNo tags attached.

Relationships

child of 0006861 resolvedlil_Toady Multi Theft Auto : San Andreas Teams members aren't sent to clients if set in onResourceStart 

Activities

ccw

2012-09-23 21:19

administrator   ~~0017619

Thanks for the patch.
I see you are starting the resource on the client before calling the server event. What happens if the event get cancelled?

Jusonex

2012-09-25 16:23

administrator   ~~0017625

Last edited: 2012-09-25 16:26

The resource will be stopped again by CResource::Stop: http://code.google.com/searchframe#KdIewVX4zdg/trunk/MTA10_Server/mods/deathmatch/logic/CResource.cpp&q=CResource%20package:mtasa-blue%5C.googlecode%5C.com&l=928
So the garbage should get collected (doesn't it?), if this was what you meant.

ccw

2012-09-26 05:31

administrator   ~~0017627

On reflection, I think changing the order of this stuff will change current behaviour too much and potentially break scripts. For example, with this patch, things done in onResourceStart (e.g. setting element data) will not be present when onClientResourceStart is called.

Jusonex

2012-09-26 14:06

administrator   ~~0017630

Last edited: 2012-09-26 14:07

What's about broadcasting the resourceelement before firing onResourceStart and the start packet?

This patch (https://dl.dropbox.com/u/53602417/mta/fix_6861_CResource.cpp.patch) also fixes the onClientResourceStart stuff.

ccw

2012-10-07 04:22

administrator   ~~0017693

Last edited: 2012-10-07 04:22

Patch is not there, but I am worried about changing current behaviour.

One solution would be to add pre and post events. http://wiki.multitheftauto.com/wiki/User:Ccw

Jusonex

2012-10-08 21:08

administrator   ~~0017699

Oh, there's a wrong bracket.

https://dl.dropbox.com/u/53602417/mta/fix_6861_CResource.cpp.patch

Issue History

Date Modified Username Field Change