Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix static weapons not being loadable in cargo #4205

Merged
merged 1 commit into from
Aug 5, 2016

Conversation

PabstMirror
Copy link
Contributor

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Aug 3, 2016
@PabstMirror PabstMirror added this to the 3.7.0 milestone Aug 3, 2016
@nicolasbadano
Copy link
Contributor

So what was the issue; doesn't StaticWeapon inherit from ThingX?

Also, shouldn't the Mortar be included too? IIRC it didn't inherit from StaticWeapon.

@PabstMirror
Copy link
Contributor Author

Mortars inherit from LandVehicle->StaticWeapon.
But we want to run FUNC(initObject) on them, not FUNC(initVehicle)

Note that this uses the XEH "object-inheritance" system, so the staticWeapon init will replace the landVehicle init.

@nicolasbadano
Copy link
Contributor

But we want to run FUNC(initObject) on them, not FUNC(initVehicle)

Oh, I get it. The ThingX init line was being overwritten by LandVehicle's init line, which called initVehicle and not initObject.

It'd probably be more robust to just call both functions for all children of ThingX and let te init functions decide which objects should be inited each way.

@PabstMirror
Copy link
Contributor Author

ThingX: Thing: All
StaticWeapon: LandVehicle: Land: AllVehicles: All

@nicolasbadano
Copy link
Contributor

Oh, ok, sorry.

@commy2
Copy link
Contributor

commy2 commented Aug 5, 2016

ThingX is ammo boxes, ground weapon holders and I think some map props mainly.

@PabstMirror PabstMirror merged commit dc7ac4c into master Aug 5, 2016
@PabstMirror PabstMirror deleted the fixStaticWeaponCargo branch August 5, 2016 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants