mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-10 12:41:35 -10:00
make Species_info[] and Asteroid_info[] dynamic
This commit is contained in:
1 parent
3fcf521f96
commit
8a9d540c4c
19 files changed
+221
-155
No files matched your search
+2
-2
@@ -1495,7 +1495,7 @@ LUA_VAR(Name, l_Species, "String", "Species name")
|
||||
if(!lua_get_args(L, "o|s", l_Species.Get(&idx), &s))
|
||||
return LUA_RETURN_NIL;
|
||||
|
||||
if(idx < 0 || idx > Num_species)
|
||||
if(idx < 0 || idx >= (int)Species_info.size())
|
||||
return LUA_RETURN_NIL;
|
||||
|
||||
if(LUA_SETTING_VAR && s != NULL) {
|
||||
@@ -1816,7 +1816,7 @@ LUA_VAR(Species, l_Shipclass, "Species", "Ship class species")
|
||||
if(idx < 0 || idx > Num_ship_classes)
|
||||
return LUA_RETURN_NIL;
|
||||
|
||||
if(LUA_SETTING_VAR && sidx > -1 && sidx < Num_species) {
|
||||
if(LUA_SETTING_VAR && sidx > -1 && sidx < (int)Species_info.size()) {
|
||||
Ship_info[idx].species = sidx;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user