TempleOSCDV5.01.ISO
This commit is contained in:
1 parent
f6eacf7744
commit
320c7ee98a
219 files changed
+5211
-4853
No files matched your search
@@ -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 &&
|
||||
|
||||
Reference in new issue
Block a user