1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[TOT] [TOTPP] IMPORTANT BUG FIX

Discussion in 'Civ2 - General Discussions' started by Prof. Garfield, Aug 17, 2019.

  1. Prof. Garfield

    Prof. Garfield Chieftain Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,141
    Location:
    Ontario
    Action Required: The file civlua.lua in Test of Time\lua should be updated to the attached file. This is important to get correct, since most scenarios rely on the civlua.lua module in Test of Time\lua

    Bug: Creating sea units on the ocean sometimes fails (and possibly sometimes land units can be created on the ocean when the code should prevent it, but that was not tested).

    Reason: there is a comparison tile.terrainType == terrain.ocean in 2 places (one is actually a ~= comparison

    Correction: The code should be (tile.terrainType % 16) == terrain.ocean

    Also: a global variable city is created, this is switched to a local in this updated file. Pretty unlikely to cause a bug, but city is a reasonable variable name, and someone might make it global for some reason, and it could cause problems.
     

    Attached Files:

  2. JPetroski

    JPetroski Chieftain

    Joined:
    Jan 24, 2011
    Messages:
    1,454
    This should be stickied if anyone has capacity.
     

Share This Page