Page 1 of 1

model.name is something different now?

Posted: 03 Oct 2018, 16:57
by smoth
Trying to get the last version of LUPS working in my game, there is a bunch of what I suspect is bitrott here.

Anyway. there is a call to unitdef[uid].model.

Code: Select all

local name = UnitDefs[self.unitDefID].model.name
name which i never used before, was this replaced? a forum search pulls up iffy results so I am starting a thread so the answer will be out there.

Re: model.name is something different now?

Posted: 03 Oct 2018, 17:17
by Kloot
Yes, UnitDefs[n].model.name became (after a slight detour) UnitDefs[n].modelname for performance reasons: https://github.com/spring/spring/blob/d ... g.txt#L247

In case you missed it and to avoid doing potential double work, grab the latest maintenance build instead of 104.0: https://springrts.com/dl/buildbot/default/maintenance/

Also, welcome back.

Re: model.name is something different now?

Posted: 03 Oct 2018, 22:18
by FLOZi
fwiw https://springrts.com/wiki/Gamedev:UnitDefs#General wiki is up-to-date in that respect. (seems direct tag links are borked atm)

Re: model.name is something different now?

Posted: 04 Oct 2018, 15:50
by smoth
Kloot wrote: 03 Oct 2018, 17:17 Yes, UnitDefs[n].model.name became (after a slight detour) UnitDefs[n].modelname for performance reasons: https://github.com/spring/spring/blob/d ... g.txt#L247

In case you missed it and to avoid doing potential double work, grab the latest maintenance build instead of 104.0: https://springrts.com/dl/buildbot/default/maintenance/

Also, welcome back.
Thanks for the info kloot!

I will as soon as I get home grab it. I cannot promise I will be the ubiquitus poster I used to be, having a kid is my present "project" and the absolute best miniature I have in my home.