Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cmake/FindFFMPEG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ FIND_LIBRARY(AVUTIL_LIBRARY
/local/bin
/mingw/bin
/bin
PATH_SUFFIXES
libavutil
)

FIND_LIBRARY(AVCODEC_LIBRARY
Expand All @@ -101,6 +103,8 @@ FIND_LIBRARY(AVCODEC_LIBRARY
/local/bin
/mingw/bin
/bin
PATH_SUFFIXES
libavcodec
)

FIND_LIBRARY(AVFORMAT_LIBRARY
Expand All @@ -120,6 +124,8 @@ FIND_LIBRARY(AVFORMAT_LIBRARY
/mingw/bin
/mingw/lib
/bin
PATH_SUFFIXES
libavformat
)

get_filename_component(FFMPEG_PARENT_DIR ${AVCODEC_INCLUDE_DIR} DIRECTORY)
Expand All @@ -130,6 +136,9 @@ SET(FFMPEG_INCLUDE_DIRS
${AVFORMAT_INCLUDE_DIR}
${FFMPEG_PARENT_DIR}
)
MESSAGE(STATUS "Found FFMPEG_INCLUDE_DIRS")
MESSAGE(STATUS "FFMPEG_INCLUDE_DIRS: ${FFMPEG_INCLUDE_DIRS}")


SET(FFMPEG_LIBRARIES)

Expand All @@ -138,20 +147,23 @@ IF(AVUTIL_LIBRARY)
${FFMPEG_LIBRARIES}
${AVUTIL_LIBRARY}
)
MESSAGE(STATUS "Found AVUTIL_LIBRARY")
ENDIF(AVUTIL_LIBRARY)

IF(AVCODEC_LIBRARY)
SET(FFMPEG_LIBRARIES
${FFMPEG_LIBRARIES}
${AVCODEC_LIBRARY}
)
MESSAGE(STATUS "Found AVCODEC_LIBRARY")
ENDIF(AVCODEC_LIBRARY)

IF(AVFORMAT_LIBRARY)
SET(FFMPEG_LIBRARIES
${FFMPEG_LIBRARIES}
${AVFORMAT_LIBRARY}
)
MESSAGE(STATUS "Found AVFORMAT_LIBRARY")
ENDIF(AVFORMAT_LIBRARY)

IF(FFMPEG_INCLUDE_DIRS AND FFMPEG_LIBRARIES)
Expand Down
5 changes: 4 additions & 1 deletion src/units/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,9 @@ StuffObject* addDevice(int x,int y,int z,int device_type,int param1,int param2,V
};

if(p){
if(device_type == UVS_ITEM_TYPE::CRUSTEST_CANNON_AMMO){
param2 = 5; // Override ammo count
}
p->ActIntBuffer.data0 = param1;
p->ActIntBuffer.data1 = param2;

Expand Down Expand Up @@ -2049,7 +2052,7 @@ void SkyFarmerObject::Init(void)
Status = SOBJ_DISCONNECT;
};

const int MAX_DROP_SEED = 1;
const int MAX_DROP_SEED = 10;
const int MAX_DROP_POINT = MAX_DROP_SEED*10;

void SkyFarmerObject::CreateSkyFarmer(int x_pos,int y_pos,int x_speed,int y_speed,int corn_type,int corn,int time)
Expand Down
38 changes: 36 additions & 2 deletions src/units/mechos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2959,12 +2959,42 @@ int InsectUnit::test_objects_collision()
int log = 0;
BaseObject* p;

int d,l,i;

p = (BaseObject*)(BulletD.Tail);
while(p){
if(p->Visibility == VISIBLE){
// if(p->ID != ID_BULLET)
// ErrH.Abort("Big BUG with memory");
if(((BulletObject*)(p))->ShowID == BULLET_SHOW_TYPE_ID::CRATER){
i = radius + p->radius;
l = getDistY(p->R_curr.y,R_curr.y);
if(l < i){
d = getDistX(p->R_curr.x,R_curr.x);
if(d < i && R_curr.z <= p->R_curr.z + i && (d*d + l*l) < i*i){
Touch(p);
p->Touch(this);
};
};
}else log += test_object_to_baseobject(p);
};
p = (BaseObject*)(p->NextTypeList);
};

p = (BaseObject*)(ActD.Tail);
while(p && p != this){
if(p->Visibility == VISIBLE)
log += test_object_to_baseobject(p);
p = (BaseObject*)(p->NextTypeList);
};

p = (BaseObject*)(JumpD.Tail);
while(p){
if(p->Visibility == VISIBLE)
log += test_object_to_baseobject(p);
p = (BaseObject*)(p->NextTypeList);
};

return 0;
};

Expand Down Expand Up @@ -10659,8 +10689,12 @@ void GunSlot::Quant(void)
g->CreateBullet(this,pData);
};
}else{
g = JumpD.CreateBall();
g->CreateBullet(this,pData);
for(i = 0;i < pData->TapeSize;i++){
g = JumpD.CreateBall();
g->CreateBullet(this,pData);
};
//g = JumpD.CreateBall();
//g->CreateBullet(this,pData);
};
break;
case GUN_WAIT:
Expand Down
2 changes: 1 addition & 1 deletion src/units/moveland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ void LocalMapProcess::Quant(void)
DestroySmooth(p->R_curr.x,p->R_curr.y,35,20,0,-63,83,4,4);
break;
case MAP_POINT_CRATER10:
DestroySmooth(p->R_curr.x,p->R_curr.y,35,20,0,-512,83,4,2);
DestroySmooth(p->R_curr.x,p->R_curr.y,35,20,0,-512,83,4,4);
break;
case MAP_POINT_CRATER11:
// for(i = 0;i < TERRAIN_MAX;i++) SmoothTerrainMask[i] = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/units/moveland.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const int MAP_POINT_DUST09 = 8;*/
const int MAP_DUST_PROCESS = 0;
const int MAP_SMOKE_PROCESS = 1;

const int MAX_DESTROY_RADIUS = 64;
const int MAX_DESTROY_RADIUS = 640;

const int MAP_LAVA_SPOT = 0;
const int MAP_LIGHT_POINT = 1;
Expand Down