Page MenuHomeWildfire Games

Allow accessing prop points in the simulation.
Needs ReviewPublic

Authored by Stan on Jun 16 2019, 12:58 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Currently it is not possible to access the model's prop point in the JS code which for instance makes it that you have to manually specify visible garrison prop points, while you could use the ones defined by artists in the mesh.

Test Plan

Test that nothing broke.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 7970
Build 12972: Vulcan BuildJenkins

Event Timeline

Stan created this revision.Jun 16 2019, 12:58 PM
Stan added inline comments.
source/simulation2/scripting/EngineScriptConversions.cpp
396

There is probably a way to make it generic for every type of std::vector but I haven't found it.

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpVisual.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/simulation2/components/ICmpVisual.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/simulation2/components/CCmpVisualActor.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1746/display/redirect

Hi! I got a segfault when testing this:

TIMER| ParseTerrain: 9.13745 ms

Thread 1 "pyrogenesis" received signal SIGSEGV, Segmentation fault.
CCmpVisualActor::Init (this=0x55555a6fd230, paramNode=...)
    at ../../../source/simulation2/components/CCmpVisualActor.cpp:212
212			std::vector<SPropPoint>& props = m_Unit->GetModel().ToCModel()->GetModelDef()->m_PropPoints;

Reproducible with attached replays.