]> git.pond.sub.org Git - empserver/commit - src/lib/commands/tran.c
transport: Don't hardcode material weights
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 May 2016 14:21:08 +0000 (16:21 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:56 +0000 (19:59 +0200)
commit3145e7d8a7eea532509f97b155cd2ec371852136
treed180b9e6ec0d9aa657fa35dc6232fb4375706714
parent5635fc212f7822bfa32f782dfd89d2e5018e65e8
transport: Don't hardcode material weights

tran_plane() computes a plane's weight from its materials.  It
hardcodes lcm weight 1, hcm weight 2, and military weight 0.  Use
ichr[].i_lbs instead, which is 1 in the stock game for all three
materials.

While there, support arbitrary materials, even though they aren't yet
possible, just to avoid unnecessary assumptions on possible build
materials.

Since the stock game's planes use fewer military than hcms, they
become up to 15% lighter, except for zep, which becomes 10% heavier.
Missiles use no military and become 20-33% lighter.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/tran.c
tests/smoke/journal.log