TempleOSCDV5.01.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:48:15 +02:00
1 parent f6eacf7744
commit 320c7ee98a
219 files changed
+5211 -4853

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ U0 PlayerIndirect()
I64 i,remaining=0,msg_code,arg1,arg2;
F64 target_x,target_y;
ViewPlayerSet(cur_player);
for (i=0;i<MAX_UNITS;i++) {
for (i=0;i<UNITS_NUM;i++) {
tmpu=&units[cur_player][i];
if (tmpu->life>0 && tmpu->indirect_fire)
remaining++;
+6 -6
View File
@@ -1,15 +1,15 @@
Unit *UnitNearestFind(I64 row,I64 col,I64 player,Bool in_LOS,F64 range=-1)
{
I64 i;
F64 dd,best_dd=MAX_F64,x1,y1,x2,y2;
F64 dd,best_dd=F64_MAX,x1,y1,x2,y2;
Unit *best=NULL;
//$LK,"Sqrt",A="MN:Sqrt"$() is slow, so work with squared distances.
if (range<0)
range=MAX_F64;
range=F64_MAX;
else
range*=range;
RowCol2XY(&x1,&y1,row,col);
for (i=0;i<MAX_UNITS;i++)
for (i=0;i<UNITS_NUM;i++)
if (units[player][i].life>0) {
if (!in_LOS || LOS(row,col,units[player][i].row,units[player][i].col)) {
RowCol2XY(&x2,&y2,units[player][i].row,units[player][i].col);
@@ -27,7 +27,7 @@ U0 PlayerIndirect()
{
Unit *target,*tmpu;
I64 i;
for (i=0;i<MAX_UNITS;i++) {
for (i=0;i<UNITS_NUM;i++) {
UserChk;
tmpu=&units[cur_player][i];
if (tmpu->life>0 && tmpu->indirect_fire &&
@@ -43,7 +43,7 @@ U0 PlayerMove()
Unit *target,*tmpu;
I64 i;
F64 x,y;
for (i=0;i<MAX_UNITS;i++) {
for (i=0;i<UNITS_NUM;i++) {
UserChk;
tmpu=&units[cur_player][i];
if (tmpu->life>0) {
@@ -64,7 +64,7 @@ U0 PlayerDirect()
{
Unit *target,*tmpu;
I64 i;
for (i=0;i<MAX_UNITS;i++) {
for (i=0;i<UNITS_NUM;i++) {
UserChk;
tmpu=&units[cur_player][i];
if (tmpu->life>0 && !tmpu->indirect_fire &&