Use change_ship_class rather than straight variable set (this is the proper way)

This commit is contained in:
WMCoolmon committed 2008-03-15 09:16:34 +00:00
1 parent d760c85ae9
commit a67ab3b802
1 file changed
+2 -1
+2 -1
View File
@@ -4829,7 +4829,8 @@ ADE_VIRTVAR(Class, l_Ship, "shipclass", "Ship class")
ship *shipp = &Ships[objh->objp->instance];
if(ADE_SETTING_VAR && idx > -1)
shipp->ship_info_index = idx;
change_ship_type(objh->objp->instance, idx, 1);
//shipp->ship_info_index = idx;
if(shipp->ship_info_index < 0)
return ade_set_error(L, "o", l_Shipclass.Set(-1));