View Issue Details

IDProjectCategoryView StatusLast Update
0003090Multi Theft Auto : San AndreasVehiclespublic2009-05-26 01:36
ReporterIJsAssigned ToArc 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Versionmtasadm_v1.0-dp1 
Target Version1.0Fixed in Version1.0 
Summary0003090: Make engineLoadDFF more safe or split into vehicle and non-vehicle loading functions
Description

As the documentation of engineLoadDFF states:

"Optional Arguments

  • model_id: The model id that should be associated with the dff, when loading a vehicle. Always pass 0 (or nothing at all) if you are replacing something else than a vehicle."

Not using the model id for vehicles will result in a crash.

Ideally the function should fail if no model id was passed for a vehicle DFF, but I don't know if there's a quick and reliable way to check whether a DFF that is being loaded is a vehicle model (or in other words: if the DFF contains embedded collisions, which is causing the crash).

TagsNo tags attached.

Relationships

child of 0003344 closed New Feature Requests Requested features tracker 

Activities

IJs

2008-01-07 12:34

administrator   ~~0007059

engineLoadDFF was altered so the 2nd model ID argument is required, but it will still crash when passing a 0 for a vehicle model.

ChrML

2008-01-08 06:34

administrator   ~~0007065

Also the RequestModel you uncommented is unsafe IJs, it should be done through our client DFF classes. Reason for that is that we have a reference system for the model info's, it might work for a few vehicles, but once you try to replace a bigger number of vehicles, GTA will crash because of more than 127 different vehicle models loaded at once. Ie replacing all the cars in SA will crash.

ChacalLoko

2009-04-01 05:56

viewer   ~~0008703

Crash on weapon model replacement... probably unworking with non-vehicles and still buggy with vehicles...
thx for the work's

by LosLokos-BR™

ChacalLoko

2009-05-04 00:31

viewer   ~~0009022

Since r702, the engineReplaceModel works properly with vehicles but only on a server with at least one player and sometimes doesnt works even with those conditions.

by LosLokos-BR™ : "We Salute You MTA Team"

mrdejong

2009-05-09 12:12

reporter   ~~0009106

Maybe you need to delete all does engine functions and replace it with:

engineLoadVehicle(string txd, string dff, int vehicleID);
engineLoadPickup(string txd, string dff, string col, int pickupID);
engineLoadObject(string txd, string dff, string col, int objectID);
engineLoadPed(string txd, string dff, int pedID);

That should be much easier!

Arc

2009-05-20 23:22

administrator   ~~0009294

No. The point of the separation into "load" and "replace" functions is that you can reuse loaded files in several models.

Arc

2009-05-26 01:36

administrator   ~~0009383

Added a patch in CMultiplayerSA to make SA simply ignore any embedded collisions if no model ID is specified.

Issue History

Date Modified Username Field Change